[gtk+/wip/meson: 181/215] meson: gtk: remove internal static libs from declared gtk dependency



commit e205ce13b739c20e4e13545de755d41a3a5a761b
Author: Tim-Philipp Müller <tim centricular com>
Date:   Mon Mar 20 16:26:13 2017 +0000

    meson: gtk: remove internal static libs from declared gtk dependency
    
    gdk and gsk are no longer separate libs but part of gtk now, so any
    Gtk+ user should just link to gtk, there's no need to additionally
    link against all those static helper libs that go into the gtk lib.
    
    This means we need to specifically add confinc to include_directories
    in more places to make sure the right config.h (i.e. ours) gets
    included and not a subproject's like graphene's config.h.
    
    Not dragging in static libs also fixes the issue of all executables
    having to be relinked for any and all changes. With this change
    it's super-fast now and can be skipped for most changes that don't
    touch the external ABI.

 gtk/meson.build   |    3 ++-
 tests/meson.build |    1 +
 2 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gtk/meson.build b/gtk/meson.build
index 938b49f..b4ea882 100644
--- a/gtk/meson.build
+++ b/gtk/meson.build
@@ -802,7 +802,8 @@ libgtk_dep = declare_dependency(
     gtktypebuiltins_c,
     gtktypebuiltins_h,
   ],
-  dependencies: gtk_deps + [libgdk_dep, libgsk_dep],
+  include_directories: [confinc],
+  dependencies: gtk_deps,
   link_with: libgtk,
   link_args: ['-Bsymbolic'],
   include_directories: [confinc, gtkinc]
diff --git a/tests/meson.build b/tests/meson.build
index 2435e3d..be12e42 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -145,6 +145,7 @@ foreach t : gtk_tests
   test_name = t.get(0)
   test_srcs = ['@0@.c'.format(test_name), t.get(1, [])]
   executable(test_name, test_srcs,
+    include_directories : [confinc, gdkinc],
     c_args : test_args,
     dependencies : [libgtk_dep, libm])
 endforeach


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