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...
pull/8989/head
Eli Schwartz 3 years ago
parent f95a8f8282
commit 1fb6c93947
No known key found for this signature in database
GPG Key ID: CEB167EFB5722BD6
  1. 5
      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',

Loading…
Cancel
Save