[gnome-dictionary] build: Use a dependency object for IPv6 libraries
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-dictionary] build: Use a dependency object for IPv6 libraries
- Date: Sat, 30 Sep 2017 15:55:51 +0000 (UTC)
commit 93ce47621d15673ee351dc79eca847c7c08c120a
Author: Emmanuele Bassi <ebassi gnome org>
Date: Sat Sep 30 16:34:05 2017 +0100
build: Use a dependency object for IPv6 libraries
Instead of manipulating the project linker flags, like we used to do
with Autotools.
libgdict/meson.build | 4 ++--
meson.build | 4 +++-
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]