aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/dependencies
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2021-06-18 11:36:01 -0400
committerEli Schwartz <eschwartz@archlinux.org>2021-07-28 01:33:46 -0400
commit1fb6c939473ca7cdab281d6b199a60d1f8f1802d (patch)
tree11f3fe7ba465e8ed5fc83eccf9667974e0ac37f7 /mesonbuild/dependencies
parentf95a8f8282f5723379216f810fa614e01ef47f03 (diff)
downloadmeson-1fb6c939473ca7cdab281d6b199a60d1f8f1802d.zip
meson-1fb6c939473ca7cdab281d6b199a60d1f8f1802d.tar.gz
meson-1fb6c939473ca7cdab281d6b199a60d1f8f1802d.tar.bz2
intl dep: support static kwarg
Since intl links internally to iconv, try to pull in iconv too, but only if we specifically ask for static libs. If PREFER_SHARED, we have no way to tell which type we got, so do not try handling that...
Diffstat (limited to 'mesonbuild/dependencies')
-rw-r--r--mesonbuild/dependencies/misc.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/mesonbuild/dependencies/misc.py b/mesonbuild/dependencies/misc.py
index 7ae0881..5d0e882 100644
--- a/mesonbuild/dependencies/misc.py
+++ b/mesonbuild/dependencies/misc.py
@@ -455,11 +455,14 @@ class IntlSystemDependency(SystemDependency):
super().__init__(name, env, kwargs)
h = self.clib_compiler.has_header('libintl.h', '', env)
- self.link_args = self.clib_compiler.find_library('intl', env, [])
+ self.link_args = self.clib_compiler.find_library('intl', env, [], self.libtype)
if h[0] and self.link_args:
self.is_found = True
+ if self.static:
+ self.link_args += self.clib_compiler.find_library('iconv', env, [], self.libtype)
+
@factory_methods({DependencyMethods.PKGCONFIG, DependencyMethods.CONFIG_TOOL, DependencyMethods.SYSTEM})
def curses_factory(env: 'Environment',