Merge pull request #179 from equeim/meson-libicu-static
Use C++ linker when building with libicu
This commit is contained in:
commit
4a10a1698b
|
@ -19,6 +19,7 @@ foreach test_case : ['fuzzer', 'load_fuzzer', 'load_dafsa_fuzzer']
|
|||
c_args : fuzzer_cargs,
|
||||
include_directories : [configinc, includedir],
|
||||
dependencies : libicu_dep,
|
||||
link_language : link_language
|
||||
)
|
||||
test(test_name, exe)
|
||||
endforeach
|
||||
|
|
|
@ -19,6 +19,8 @@ libunistring = notfound
|
|||
networking_deps = notfound
|
||||
libiconv_dep = notfound
|
||||
|
||||
link_language = 'c'
|
||||
|
||||
# FIXME: Cleanup this when Meson gets 'feature-combo':
|
||||
# https://github.com/mesonbuild/meson/issues/4566
|
||||
# Dependency fallbacks would help too:
|
||||
|
@ -59,6 +61,11 @@ if ['libicu', 'auto'].contains(enable_runtime) or ['libicu', 'auto'].contains(en
|
|||
if enable_builtin == 'auto'
|
||||
enable_builtin = 'libicu'
|
||||
endif
|
||||
if add_languages('cpp', native : false)
|
||||
link_language = 'cpp'
|
||||
else
|
||||
error('C++ compiler is not available')
|
||||
endif
|
||||
elif [enable_runtime, enable_builtin].contains('libicu')
|
||||
error('You requested libicu but it is not installed.')
|
||||
endif
|
||||
|
|
|
@ -29,6 +29,7 @@ libpsl = library('psl', sources, suffixes_dafsa_h,
|
|||
dependencies : [libidn2_dep, libidn_dep, libicu_dep, libunistring, networking_deps, libiconv_dep],
|
||||
version: library_version,
|
||||
install: true,
|
||||
link_language : link_language
|
||||
)
|
||||
|
||||
pkgconfig.generate(libpsl,
|
||||
|
|
|
@ -32,6 +32,7 @@ foreach test_name : tests
|
|||
exe = executable(test_name, source,
|
||||
c_args : tests_cargs,
|
||||
link_with : libpsl,
|
||||
include_directories : [configinc, includedir])
|
||||
include_directories : [configinc, includedir],
|
||||
link_language : link_language)
|
||||
test(test_name, exe, depends : [psl_dafsa, psl_ascii_dafsa])
|
||||
endforeach
|
||||
|
|
|
@ -2,6 +2,7 @@ psl = executable('psl', 'psl.c',
|
|||
link_with : libpsl,
|
||||
include_directories : [configinc, includedir],
|
||||
c_args : ['-DHAVE_CONFIG_H'],
|
||||
link_language : link_language,
|
||||
install : true,
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue