[gtk+/wip/meson: 73/73] meson: make sure gsk/gdk generated headers exist for libgtk_dep users
- From: Tim-Philipp Müller <tpm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/meson: 73/73] meson: make sure gsk/gdk generated headers exist for libgtk_dep users
- Date: Wed, 22 Mar 2017 09:38:13 +0000 (UTC)
commit 4b198ee0798d8c2780f02f7822666f4119fe0ea0
Author: Tim-Philipp Müller <tim centricular com>
Date: Wed Mar 22 00:45:39 2017 +0000
meson: make sure gsk/gdk generated headers exist for libgtk_dep users
Add back dependencies on libgdk_dep and libsk_dep which are declared
dependencies. We removed this before because these declarations had
link_with: lines that dragged in the static libgdk.a and libgsk.a libs
which are linked into libgtk-4.so anyway and thus shouldn't be used
when linking internal exes/tools against libgtk-4. Remove the static
libs from the declared dependencies and have libgtk link those in
explicitly, so that the declared deps now just provide all the built
dependencies and include dirs and such for declared libgtk_dep users
such as the internal exes/tools, which want all the generated gsk/gdk/gtk
headers to exist before attempting to compile anything against the
gtk+ headers.
gdk/meson.build | 12 +++++-------
gsk/meson.build | 12 +++++++-----
gtk/meson.build | 21 ++++++++-------------
testsuite/gdk/meson.build | 2 +-
4 files changed, 21 insertions(+), 26 deletions(-)
---
diff --git a/gdk/meson.build b/gdk/meson.build
index b5b5edf..10e53b7 100644
--- a/gdk/meson.build
+++ b/gdk/meson.build
@@ -200,15 +200,13 @@ libgdk = static_library('gdk',
c_args: ['-DGDK_COMPILATION', '-DG_LOG_DOMAIN="Gdk"'],
include_directories: [confinc, xinc, wlinc],
link_with: gdk_backends,
- dependencies: gdk_deps,
-)
-
+ dependencies: gdk_deps)
+# We don't have link_with: to internal static libs here on purpose, just
+# list the dependencies and generated headers and such, for use in the
+# "public" libgtk_dep used by internal executables.
libgdk_dep = declare_dependency(
sources: ['gdk.h', gdkconfig, gdkenum_h],
depends: gdk_sources,
include_directories: [confinc, xinc, wlinc],
- dependencies: gdk_deps,
- link_with: libgdk,
- link_args: ['-Bsymbolic'],
-)
+ dependencies: gdk_deps)
diff --git a/gsk/meson.build b/gsk/meson.build
index 3bd0590..0b87438 100644
--- a/gsk/meson.build
+++ b/gsk/meson.build
@@ -157,12 +157,14 @@ libgsk = static_library('gsk',
dependencies: gsk_deps,
include_directories: [confinc],
c_args: ['-DGSK_COMPILATION', '-DG_LOG_DOMAIN="Gsk"'],
-)
+ link_with: libgdk,
+ link_args: ['-Bsymbolic'])
+# We don't have link_with: to internal static libs here on purpose, just
+# list the dependencies and generated headers and such, for use in the
+# "public" libgtk_dep used by internal executables.
libgsk_dep = declare_dependency(
depends: gsk_sources,
- link_with: libgsk,
- link_args: ['-Bsymbolic'],
include_directories: [confinc],
- sources: [gskenum_h, gskresources]
-)
+ sources: [gskenum_h, gskresources],
+ dependencies: libgdk_dep)
diff --git a/gtk/meson.build b/gtk/meson.build
index 7f8007d..9546d58 100644
--- a/gtk/meson.build
+++ b/gtk/meson.build
@@ -827,22 +827,17 @@ libgtk = shared_library('gtk-4',
sources: [typefuncs, gtk_sources, gtkmarshal_h, gtkprivatetypebuiltins_h],
c_args: gtk_cargs,
include_directories: [confinc, gdkinc, gtkinc],
- dependencies: [gtk_deps, libgdk_dep, libgsk_dep],
- install: true
-)
+ dependencies: gtk_deps + [libgdk_dep, libgsk_dep],
+ link_with: [libgdk, libgsk],
+ link_args: ['-Bsymbolic'],
+ install: true)
libgtk_dep = declare_dependency(
- sources: [
- 'gtk.h',
- gtkversion,
- gtktypebuiltins_h,
- ],
- include_directories: [confinc],
- dependencies: gtk_deps,
+ sources: [gtkversion, gtktypebuiltins_h],
+ include_directories: [confinc, gtkinc],
+ dependencies: gtk_deps + [libgdk_dep, libgsk_dep],
link_with: libgtk,
- link_args: ['-Bsymbolic'],
- include_directories: [confinc, gtkinc]
-)
+ link_args: ['-Bsymbolic'])
# Installed tools
diff --git a/testsuite/gdk/meson.build b/testsuite/gdk/meson.build
index 6c85e75..cfe2d07 100644
--- a/testsuite/gdk/meson.build
+++ b/testsuite/gdk/meson.build
@@ -17,7 +17,7 @@ test('gdk/keysyms', test_keysyms)
test_rectangle = executable('rectangle', 'rectangle.c', dependencies: libgtk_dep)
test('gdk/rectangle', test_rectangle)
-test_rgba = executable('rgba', 'rgba.c', dependencies: libgdk_dep)
+test_rgba = executable('rgba', 'rgba.c', dependencies: libgtk_dep)
test('gdk/rgba', test_rgba)
test_seat = executable('seat', 'seat.c', dependencies: libgtk_dep)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]