meson: Clean up finding ICU-UC on Visual Studio
Nowadays Meson has much better CMake support which we can use to find dependencies on Visual Studio builds (and Visual Studio 2017 and later provides CMake as an optional install item), so we can use it to help us find ICU-UC on Visual Studio builds, since CMake has built-in support for finding it by the components we need for some time.
This commit is contained in:
parent
561e8ba887
commit
f0573d8462
31
meson.build
31
meson.build
|
@ -93,28 +93,15 @@ gobject_dep = dependency('gobject-2.0', required: get_option('gobject'))
|
||||||
graphite2_dep = dependency('graphite2', required: get_option('graphite2'))
|
graphite2_dep = dependency('graphite2', required: get_option('graphite2'))
|
||||||
graphite_dep = dependency('graphite2', required: get_option('graphite'))
|
graphite_dep = dependency('graphite2', required: get_option('graphite'))
|
||||||
|
|
||||||
icu_dep = null_dep
|
if cpp.get_argument_syntax() == 'msvc'
|
||||||
if not get_option('icu').disabled()
|
icu_dep = dependency('ICU',
|
||||||
icu_dep = dependency('icu-uc', required: false)
|
required: get_option('icu'),
|
||||||
|
components: 'uc',
|
||||||
if (not icu_dep.found() and
|
method: 'cmake')
|
||||||
cpp.get_id() == 'msvc' and
|
else
|
||||||
cpp.has_header('unicode/uchar.h') and
|
icu_dep = dependency('icu-uc',
|
||||||
cpp.has_header('unicode/unorm2.h') and
|
required: get_option('icu'),
|
||||||
cpp.has_header('unicode/ustring.h') and
|
method: 'pkg-config')
|
||||||
cpp.has_header('unicode/utf16.h') and
|
|
||||||
cpp.has_header('unicode/uversion.h') and
|
|
||||||
cpp.has_header('unicode/uscript.h'))
|
|
||||||
if get_option('buildtype') == 'debug'
|
|
||||||
icu_dep = cpp.find_library('icuucd', required: false)
|
|
||||||
else
|
|
||||||
icu_dep = cpp.find_library('icuuc', required: false)
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
if not icu_dep.found()
|
|
||||||
icu_dep = dependency('icu-uc', required: get_option('icu'))
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if icu_dep.found() and icu_dep.type_name() == 'pkgconfig'
|
if icu_dep.found() and icu_dep.type_name() == 'pkgconfig'
|
||||||
|
|
Loading…
Reference in New Issue