[gnome-control-center/gbsneto/interactive-test-panels: 11/13] build: Reorganize shell libraries and dependencies
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/gbsneto/interactive-test-panels: 11/13] build: Reorganize shell libraries and dependencies
- Date: Fri, 9 Nov 2018 03:21:16 +0000 (UTC)
commit eed7e3f11a76129640b9b6d106c9f3fec9044ae2
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Wed Nov 7 22:16:21 2018 -0200
build: Reorganize shell libraries and dependencies
This commit does a few different bit interwined things to the
build steps:
* Make libtestshell and gnome-control-center share more of the
variables and resouces;
* Use 'dependencies' instead of 'link_with' for libshell;
* Add some visual marks as comments;
shell/meson.build | 111 ++++++++++++++++++++++++++++++++----------------------
1 file changed, 67 insertions(+), 44 deletions(-)
---
diff --git a/shell/meson.build b/shell/meson.build
index 6237c54fb..2648b4e9a 100644
--- a/shell/meson.build
+++ b/shell/meson.build
@@ -34,47 +34,81 @@ i18n.merge_file(
cflags = ['-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)]
-libshell = static_library(
- 'shell',
- sources : 'cc-shell-model.c',
- include_directories : [top_inc, common_inc],
- dependencies : common_deps,
- c_args : cflags
-)
-sources = files(
+# Common sources between gnome-control-center and
+# libtestshell.
+common_sources = files(
'cc-application.c',
'cc-log.c',
'cc-object-storage.c',
'cc-panel-loader.c',
'cc-panel.c',
'cc-shell.c',
- 'main.c'
+ 'cc-panel-list.c',
+ 'cc-window.c',
)
+
+###################
+# Generated files #
+###################
+
+# Debug
+debug_conf = configuration_data()
+debug_conf.set('BUGREPORT_URL', 'http://bugzilla.gnome.org/enter_bug.cgi?product=' + meson.project_name())
+debug_conf.set10('ENABLE_TRACING', enable_tracing)
+
+common_sources += configure_file(
+ input : 'cc-debug.h.in',
+ output : 'cc-debug.h',
+ configuration : debug_conf
+)
+
+#Resources
resource_data = files(
'cc-panel-list.ui',
'cc-window.ui',
'help-overlay.ui',
)
-sources += gnome.compile_resources(
- 'resources',
- meson.project_name() + '.gresource.xml',
- dependencies: resource_data,
- export: true
+common_sources += gnome.compile_resources(
+ 'resources',
+ 'gnome-control-center.gresource.xml',
+ dependencies : resource_data,
+ export : true
)
-sources += files(
- 'cc-panel-list.c',
- 'cc-window.c'
+
+############
+# libshell #
+############
+
+libshell = static_library(
+ 'shell',
+ sources : 'cc-shell-model.c',
+ include_directories : [top_inc, common_inc],
+ dependencies : common_deps,
+ c_args : cflags
)
+libshell_dep = declare_dependency(
+ include_directories : top_inc,
+ link_with : libshell
+)
+
+
+########################
+# gnome-control-center #
+########################
+
+shell_sources = common_sources + files('main.c')
+
shell_deps = common_deps + [
libdevice_dep,
liblanguage_dep,
libwidgets_dep,
- x11_dep
+ x11_dep,
+ libshell_dep,
]
if enable_cheese
@@ -85,27 +119,21 @@ if host_is_linux_not_s390
shell_deps += wacom_deps
endif
-# Debug
-debug_conf = configuration_data()
-debug_conf.set('BUGREPORT_URL', 'http://bugzilla.gnome.org/enter_bug.cgi?product=' + meson.project_name())
-debug_conf.set10('ENABLE_TRACING', enable_tracing)
-
-sources += configure_file(
- input : 'cc-debug.h.in',
- output : 'cc-debug.h',
- configuration : debug_conf
-)
-
executable(
meson.project_name(),
- sources,
+ shell_sources,
include_directories : top_inc,
dependencies : shell_deps,
c_args : cflags,
- link_with : panels_libs + [libshell],
+ link_with : panels_libs,
install : true
)
+
+##################
+# lipanel_loader #
+##################
+
# Because it is confusing and somewhat problematic to directly add and compile
# cc-panel-loader.o by another directory (i.e. the shell search provider), we
# have to create a library and link it there, just like libshell.la.
@@ -117,23 +145,18 @@ libpanel_loader = static_library(
c_args : cflags + ['-DCC_PANEL_LOADER_NO_GTYPES']
)
-# libshell_test
-sources = files(
- 'cc-application.c',
- 'cc-log.c',
- 'cc-panel.c',
- 'cc-panel-list.c',
- 'cc-shell.c',
- 'cc-shell-model.c',
- 'cc-object-storage.c',
-)
+
+################
+# libtestshell #
+################
+
libtestshell = static_library(
'testshell',
- sources,
+ common_sources,
include_directories : top_inc,
- dependencies : common_deps + [ libwidgets_dep ],
+ dependencies : shell_deps,
c_args : cflags,
- link_with : panels_libs
+ link_with : panels_libs,
)
libtestshell_dep = declare_dependency(
include_directories : top_inc,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]