[gnome-usage] build: Improve compiled resources
- From: Petr Štětka <pstetka src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-usage] build: Improve compiled resources
- Date: Thu, 21 Dec 2017 17:30:00 +0000 (UTC)
commit cd92ec715220d4db9040482b9d267ec8d4380496
Author: Iñigo Martínez <inigomartinez gmail com>
Date: Wed Dec 20 13:22:55 2017 +0100
build: Improve compiled resources
The list of files used by the resources file has been added, so
their existence is checked during the resource generation.
The gresources vala parameter has been also removed, because it
has the same effect as it not necessary anymore.
The meson's `gnome` module has also been grouped with the i18n
module just for consistency.
data/meson.build | 24 +++++++++++++++++++-----
meson.build | 1 +
src/meson.build | 1 -
3 files changed, 20 insertions(+), 6 deletions(-)
---
diff --git a/data/meson.build b/data/meson.build
index a5ca9bb..e9e505a 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -1,9 +1,23 @@
-gnome_module = import('gnome')
+resource_data = files(
+ 'interface/adwaita.css',
+ 'ui/header-bar.ui',
+ 'ui/memory-speedometer.ui',
+ 'ui/no-results-found-view.ui',
+ 'ui/performance-view.ui',
+ 'ui/process-row.ui',
+ 'ui/quit-process-dialog.ui',
+ 'ui/speedometer.ui',
+ 'ui/storage-actionbar.ui',
+ 'ui/storage-view.ui',
+ 'ui/swap-speedometer.ui'
+)
-resources = gnome_module.compile_resources('org.gnome.Usage',
- 'org.gnome.Usage.gresource.xml',
- source_dir: 'data',
- c_name: 'resources')
+resources = gnome.compile_resources(
+ 'org.gnome.Usage',
+ 'org.gnome.Usage.gresource.xml',
+ c_name: 'resources',
+ dependencies: resource_data
+)
install_data('org.gnome.Usage.gschema.xml', install_dir : get_option('datadir') + '/glib-2.0/schemas/')
diff --git a/meson.build b/meson.build
index b131898..f5db785 100644
--- a/meson.build
+++ b/meson.build
@@ -15,6 +15,7 @@ gtop = dependency('libgtop-2.0', version : '>=2.34.0')
accountsservice = dependency('accountsservice', version: '>= 0.6.40')
math = cc.find_library('m')
+gnome = import('gnome')
i18n = import('i18n')
po_dir = join_paths(meson.source_root(), 'po')
diff --git a/src/meson.build b/src/meson.build
index df25bc6..503d515 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -42,7 +42,6 @@ vala_sources = [
'window.vala']
vala_args = [
- '--gresources=' + meson.source_root() + '/data/org.gnome.Usage.gresource.xml',
'--pkg=rg',
'--pkg=egg',
'--pkg=libgtop-2.0',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]