|
|
@ -1,4 +1,4 @@ |
|
|
|
From 90fcdb5b02e08b3faf2e321b081798cc18d35b15 Mon Sep 17 00:00:00 2001 |
|
|
|
From 8ece1141e455d6643df0be885a5df200bdb3bc78 Mon Sep 17 00:00:00 2001 |
|
|
|
From: Rosen Penev <rosenp@gmail.com> |
|
|
|
Date: Thu, 30 Jul 2020 14:34:07 -0700 |
|
|
|
Subject: [PATCH] icu/meson: link against iconv when used externally |
|
|
@ -17,18 +17,18 @@ Signed-off-by: Rosen Penev <rosenp@gmail.com> |
|
|
|
1 file changed, 12 insertions(+), 2 deletions(-) |
|
|
|
|
|
|
|
diff --git a/src/lib/icu/meson.build b/src/lib/icu/meson.build
|
|
|
|
index bd6e30944..132e15b89 100644
|
|
|
|
index bd6e30944..e63d614a0 100644
|
|
|
|
--- a/src/lib/icu/meson.build
|
|
|
|
+++ b/src/lib/icu/meson.build
|
|
|
|
@@ -18,8 +18,18 @@ if icu_dep.found()
|
|
|
|
'Init.cxx', |
|
|
|
] |
|
|
|
elif not get_option('iconv').disabled() |
|
|
|
- have_iconv = compiler.has_function('iconv')
|
|
|
|
- have_iconv = compiler.has_function('iconv', prefix : '#include <iconv.h>')
|
|
|
|
- conf.set('HAVE_ICONV', have_iconv)
|
|
|
|
+ have_iconv = c_compiler.has_header_symbol('iconv.h', 'iconv')
|
|
|
|
+ if have_iconv
|
|
|
|
+ libiconv = c_compiler.find_library('iconv')
|
|
|
|
+ libiconv = c_compiler.find_library('iconv', required : false)
|
|
|
|
+ conf.set('HAVE_ICONV', have_iconv)
|
|
|
|
+ libiconv_dep = static_library('iconv', icu_sources, include_directories: inc, dependencies: libiconv)
|
|
|
|
+ icu_dep = declare_dependency(link_with: libiconv_dep, dependencies: util_dep)
|
|
|
|