summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2017-09-30 16:34:05 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2017-09-30 16:54:45 +0100
commit93ce47621d15673ee351dc79eca847c7c08c120a (patch)
treea12b67529ef6f963381e4392b014f16a07a67292
parent42407dd44d3907bb158885443cda751070e91e5b (diff)
downloadgnome-dictionary-93ce47621d15673ee351dc79eca847c7c08c120a.tar.gz
build: Use a dependency object for IPv6 libraries
Instead of manipulating the project linker flags, like we used to do with Autotools.
-rw-r--r--libgdict/meson.build4
-rw-r--r--meson.build4
2 files changed, 5 insertions, 3 deletions
diff --git a/libgdict/meson.build b/libgdict/meson.build
index 8e56292..5df874c 100644
--- a/libgdict/meson.build
+++ b/libgdict/meson.build
@@ -80,7 +80,7 @@ libgdict_inc = include_directories('.')
libgdict_lib = static_library('libgdict-1.0',
sources: sources_h_priv + sources_c + libgdict_enums + libgdict_marshal,
- dependencies: [ gio_dep, gtk_dep ],
+ dependencies: [ gio_dep, gtk_dep, ipv6_deps ],
include_directories: [ root_dir, libgdict_inc ],
c_args: common_cflags + debug_cflags + libgdict_cflags,
link_args: libgdict_ldflags,
@@ -89,4 +89,4 @@ libgdict_lib = static_library('libgdict-1.0',
libgdict_dep = declare_dependency(sources: libgdict_enums + libgdict_marshal,
link_with: libgdict_lib,
include_directories: [ libgdict_inc ],
- dependencies: [ gio_dep, gtk_dep ])
+ dependencies: [ gio_dep, gtk_dep, ipv6_deps ])
diff --git a/meson.build b/meson.build
index 4084bbe..dde26a5 100644
--- a/meson.build
+++ b/meson.build
@@ -85,6 +85,8 @@ elif buildtype == 'release'
debug_cflags += [ '-DG_DISABLE_ASSERT', '-DG_DISABLE_CHECKS', '-DG_DISABLE_CAST_CHECKS', ]
endif
+ipv6_deps = []
+
use_ipv6 = get_option('use_ipv6')
if use_ipv6
ipv6_prog = '''
@@ -108,7 +110,7 @@ int main (void) {
if not found_getaddrinfo and dep.found()
has_getaddrinfo = cc.has_function('getaddrinfo', dependencies: dep)
if has_getaddrinfo
- add_project_link_arguments('-l@0@'.format(l), language: 'c')
+ ipv6_deps += dep
endif
endif
endforeach