meson: on msvc icu installs the libraries with a "d" suffix
This commit is contained in:
parent
c6fdf56b20
commit
0bd3ae2a0c
13
meson.build
13
meson.build
|
@ -7,6 +7,10 @@ cc = meson.get_compiler('c')
|
||||||
enable_runtime = get_option('runtime')
|
enable_runtime = get_option('runtime')
|
||||||
enable_builtin = get_option('builtin')
|
enable_builtin = get_option('builtin')
|
||||||
|
|
||||||
|
# We need to know the build type to determine what .lib files we need on Visual Studio
|
||||||
|
# for dependencies that don't normally come with pkg-config files for Visual Studio builds
|
||||||
|
buildtype = get_option('buildtype')
|
||||||
|
|
||||||
notfound = dependency('', required : false)
|
notfound = dependency('', required : false)
|
||||||
libidn2_dep = notfound
|
libidn2_dep = notfound
|
||||||
libicu_dep = notfound
|
libicu_dep = notfound
|
||||||
|
@ -38,7 +42,14 @@ endif
|
||||||
if ['libicu', 'auto'].contains(enable_runtime) or ['libicu', 'auto'].contains(enable_builtin)
|
if ['libicu', 'auto'].contains(enable_runtime) or ['libicu', 'auto'].contains(enable_builtin)
|
||||||
libicu_dep = dependency('icu-uc', required : false)
|
libicu_dep = dependency('icu-uc', required : false)
|
||||||
if not libicu_dep.found() and cc.has_header('unicode/ustring.h')
|
if not libicu_dep.found() and cc.has_header('unicode/ustring.h')
|
||||||
libicu_dep = cc.find_library('icuuc', required : false)
|
# MSVC: the debug configuration of ICU generated the libraries with d suffix
|
||||||
|
# we must handle this and search for the right library depending on the
|
||||||
|
# build type. Note debugoptimized is just a release build with .pdb files enabled
|
||||||
|
if cc.get_id() == 'msvc' and buildtype == 'debug'
|
||||||
|
libicu_dep = cc.find_library('icuucd', required : false)
|
||||||
|
else
|
||||||
|
libicu_dep = cc.find_library('icuuc', required : false)
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
if libicu_dep.found()
|
if libicu_dep.found()
|
||||||
if enable_runtime == 'auto'
|
if enable_runtime == 'auto'
|
||||||
|
|
Loading…
Reference in New Issue