meson: on msvc icu installs the libraries with a "d" suffix
This commit is contained in:
parent
c6fdf56b20
commit
0bd3ae2a0c
11
meson.build
11
meson.build
|
@ -7,6 +7,10 @@ cc = meson.get_compiler('c')
|
|||
enable_runtime = get_option('runtime')
|
||||
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)
|
||||
libidn2_dep = notfound
|
||||
libicu_dep = notfound
|
||||
|
@ -38,8 +42,15 @@ endif
|
|||
if ['libicu', 'auto'].contains(enable_runtime) or ['libicu', 'auto'].contains(enable_builtin)
|
||||
libicu_dep = dependency('icu-uc', required : false)
|
||||
if not libicu_dep.found() and cc.has_header('unicode/ustring.h')
|
||||
# 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
|
||||
if libicu_dep.found()
|
||||
if enable_runtime == 'auto'
|
||||
enable_runtime = 'libicu'
|
||||
|
|
Loading…
Reference in New Issue