@@ -813,11 +813,25 @@ endif
813
813
814
814
icuopt = get_option (' icu' )
815
815
if not icuopt.disabled()
816
- icu = dependency (' icu-uc' , required : icuopt)
817
- icu_i18n = dependency (' icu-i18n' , required : icuopt)
816
+ icu = dependency (' icu-uc' , required : false )
817
+ if icu.found()
818
+ icu_i18n = dependency (' icu-i18n' , required : true )
819
+ endif
820
+
821
+ # Unfortunately the dependency is named differently with cmake
822
+ if not icu.found() # combine with above once meson 0.60.0 is required
823
+ icu = dependency (' ICU' , required : icuopt,
824
+ components : [' uc' ], modules : [' ICU::uc' ], method : ' cmake' )
825
+ if icu.found()
826
+ icu_i18n = dependency (' ICU' , required : true ,
827
+ components : [' i18n' ], modules : [' ICU::i18n' ])
828
+ endif
829
+ endif
818
830
819
831
if icu.found()
820
832
cdata.set(' USE_ICU' , 1 )
833
+ else
834
+ icu_i18n = not_found_dep
821
835
endif
822
836
823
837
else
@@ -833,7 +847,12 @@ endif
833
847
834
848
libxmlopt = get_option (' libxml' )
835
849
if not libxmlopt.disabled()
836
- libxml = dependency (' libxml-2.0' , required : libxmlopt, version : ' >= 2.6.23' )
850
+ libxml = dependency (' libxml-2.0' , required : false , version : ' >= 2.6.23' )
851
+ # Unfortunately the dependency is named differently with cmake
852
+ if not libxml.found() # combine with above once meson 0.60.0 is required
853
+ libxml = dependency (' LibXml2' , required : libxmlopt, version : ' >= 2.6.23' ,
854
+ method : ' cmake' )
855
+ endif
837
856
838
857
if libxml.found()
839
858
cdata.set(' USE_LIBXML' , 1 )
@@ -850,7 +869,11 @@ endif
850
869
851
870
libxsltopt = get_option (' libxslt' )
852
871
if not libxsltopt.disabled()
853
- libxslt = dependency (' libxslt' , required : libxsltopt)
872
+ libxslt = dependency (' libxslt' , required : false )
873
+ # Unfortunately the dependency is named differently with cmake
874
+ if not libxslt.found() # combine with above once meson 0.60.0 is required
875
+ libxslt = dependency (' LibXslt' , required : libxsltopt, method : ' cmake' )
876
+ endif
854
877
855
878
if libxslt.found()
856
879
cdata.set(' USE_LIBXSLT' , 1 )
@@ -867,7 +890,13 @@ endif
867
890
868
891
lz4opt = get_option (' lz4' )
869
892
if not lz4opt.disabled()
870
- lz4 = dependency (' liblz4' , required : lz4opt)
893
+ lz4 = dependency (' liblz4' , required : false )
894
+ # Unfortunately the dependency is named differently with cmake
895
+ if not lz4.found() # combine with above once meson 0.60.0 is required
896
+ lz4 = dependency (' lz4' , required : lz4opt,
897
+ method : ' cmake' , modules : [' LZ4::lz4_shared' ],
898
+ )
899
+ endif
871
900
872
901
if lz4.found()
873
902
cdata.set(' USE_LZ4' , 1 )
@@ -1486,7 +1515,12 @@ endif
1486
1515
1487
1516
zstdopt = get_option (' zstd' )
1488
1517
if not zstdopt.disabled()
1489
- zstd = dependency (' libzstd' , required : zstdopt, version : ' >=1.4.0' )
1518
+ zstd = dependency (' libzstd' , required : false , version : ' >=1.4.0' )
1519
+ # Unfortunately the dependency is named differently with cmake
1520
+ if not zstd.found() # combine with above once meson 0.60.0 is required
1521
+ zstd = dependency (' zstd' , required : zstdopt, version : ' >=1.4.0' ,
1522
+ method : ' cmake' , modules : [' zstd::libzstd_shared' ])
1523
+ endif
1490
1524
1491
1525
if zstd.found()
1492
1526
cdata.set(' USE_ZSTD' , 1 )
0 commit comments