[gnome-shell] build: Use internal dependencies
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] build: Use internal dependencies
- Date: Thu, 10 Aug 2017 22:45:25 +0000 (UTC)
commit 86995d724e0bdccb81be64fe57af5baa4c587c32
Author: Emmanuele Bassi <ebassi gnome org>
Date: Thu Aug 10 23:30:42 2017 +0100
build: Use internal dependencies
We cannot rely on any build order, except the one we specify ourselves.
St depends on various generated files; other targets depend on those
files existing, so they can be included. There is no direct relationship
between targets and files, unless we declare a dependency, using the
Meson declare_dependency() constructor — which allows us to replace the
various `link_with` directives with the more appropriate `dependencies`
one, and also allows us to specify sources that must exist by the time
we build those targets.
src/meson.build | 11 ++++++-----
src/st/meson.build | 4 ++++
2 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/src/meson.build b/src/meson.build
index 6957a94..5f1e0b0 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -101,6 +101,7 @@ libshell_menu_gir = gnome.generate_gir(libshell_menu,
install: true
)
+libshell_menu_dep = declare_dependency(link_with: libshell_menu)
libshell_public_headers = [
'shell-app.h',
@@ -209,16 +210,18 @@ libshell_no_gir_sources += dbus_generated
libshell = library('gnome-shell',
sources: libshell_gir_sources + libshell_no_gir_sources,
- dependencies: gnome_shell_deps + [mutter_dep, m_dep],
+ dependencies: gnome_shell_deps + [libshell_menu_dep, libst_dep, mutter_dep, m_dep],
include_directories: [conf_inc, st_inc, include_directories('tray')],
c_args: gnome_shell_cflags,
- link_with: [libshell_menu, libst, libtray],
+ link_with: [libtray],
link_args: rpath_link_args,
install_rpath: install_rpath,
install_dir: pkglibdir,
install: true
)
+libshell_dep = declare_dependency(link_with: libshell)
+
libshell_gir_includes = [
'Clutter-@0@'.format(mutter_api_version),
'ClutterX11-@0@'.format(mutter_api_version),
@@ -241,7 +244,6 @@ gnome.generate_gir(libshell,
nsversion: '0.1',
namespace: 'Shell',
includes: libshell_gir_includes,
- link_with: [libshell_menu, libst],
extra_args: ['--quiet'],
install_dir_gir: pkgdatadir,
install_dir_typelib: pkglibdir,
@@ -252,8 +254,7 @@ executable('gnome-shell', 'main.c',
c_args: gnome_shell_cflags + [
'-DMUTTER_TYPELIB_DIR="@0@"'.format(mutter_typelibdir)
],
- dependencies: gnome_shell_deps + [mutter_dep],
- link_with: libshell,
+ dependencies: gnome_shell_deps + [libshell_dep, mutter_dep],
include_directories: [conf_inc, st_inc, include_directories('tray')],
link_args: rpath_link_args,
install_rpath: install_rpath,
diff --git a/src/st/meson.build b/src/st/meson.build
index 02064bd..ab5526c 100644
--- a/src/st/meson.build
+++ b/src/st/meson.build
@@ -127,6 +127,10 @@ libst = shared_library('st-1.0',
install: true
)
+libst_dep = declare_dependency(link_with: libst,
+ sources: st_built_sources
+)
+
test_theme = executable('test-theme',
sources: 'test-theme.c',
c_args: st_cflags,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]