[libwnck/wip/marco/meson-build: 4/8] meson: use lib dependency instead of replicating them around



commit ee69fc660d2972be8fcbd4d893ef5c9651878521
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date:   Thu Sep 20 09:57:06 2018 -0500

    meson: use lib dependency instead of replicating them around

 doc/meson.build     |  4 +---
 libwnck/meson.build | 27 +++++++++++++++------------
 2 files changed, 16 insertions(+), 15 deletions(-)
---
diff --git a/doc/meson.build b/doc/meson.build
index 4ad0e22..cadec0d 100644
--- a/doc/meson.build
+++ b/doc/meson.build
@@ -4,9 +4,7 @@ gnome.gtkdoc(meson.project_name(),
   main_sgml: meson.project_name() + '-docs.sgml',
   src_dir: join_paths(meson.source_root(), meson.project_name()),
   dependencies: declare_dependency(
-    include_directories: default_includes,
-    dependencies: LIBWNCK_DEPS,
-    compile_args: libwnck_cflags,
+    dependencies: libwnck_dep,
     link_with: libwnck_lib
   ),
   gobject_typesfile: meson.project_name() + '.types',
diff --git a/libwnck/meson.build b/libwnck/meson.build
index 2e6878e..b01ea2c 100644
--- a/libwnck/meson.build
+++ b/libwnck/meson.build
@@ -119,29 +119,32 @@ if get_option('enable-deprecation-flags')
   endforeach
 endif
 
-libwnck_lib = shared_library(LIBNAME,
+libwnck_dep = declare_dependency(
   include_directories: default_includes,
-  sources: sources + a11y_sources + enum_types + resources,
   dependencies: LIBWNCK_DEPS,
+  compile_args: libwnck_cflags,
+  link_args: libwnck_ldflags,
+)
+
+libwnck_lib = shared_library(LIBNAME,
+  dependencies: libwnck_dep,
+  sources: sources + a11y_sources + enum_types + resources,
   version: '@0@.@1@.@2@'.format(LIBWNCK_SOVERSION, LIBWNCK_CURRENT, LIBWNCK_REVISION),
   soversion: LIBWNCK_SOVERSION,
   install: true,
-  c_args: libwnck_cflags,
-  link_args: libwnck_ldflags,
 )
 
 introspection = get_option('introspection')
 if not introspection.disabled()
   find_program('g-ir-scanner', required: introspection.enabled())
   gnome.generate_gir(libwnck_lib,
-    sources : headers + sources + enum_types,
-    namespace : 'Wnck',
-    nsversion : MODULE_VERSION,
-    export_packages : PACKAGE_NAME,
-    includes : ['GObject-2.0', 'GdkPixbuf-2.0', 'Gtk-3.0'],
-    extra_args:  ['--c-include=@0@/@0@.h'.format(meson.project_name()),
-                  '--cflags-begin'] + libwnck_cflags + ['--cflags-end'],
-    install : true
+    sources: headers + sources + enum_types,
+    namespace: 'Wnck',
+    nsversion: MODULE_VERSION,
+    export_packages: PACKAGE_NAME,
+    includes: ['GObject-2.0', 'GdkPixbuf-2.0', 'Gtk-3.0'],
+    extra_args: '--c-include=@0@/@0@.h'.format(meson.project_name()),
+    install: true
   )
 endif
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]