[gnome-sound-recorder/wip/jtojnar/run: 3/4] build: add run target
- From: Christopher Davis <christopherdavis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-sound-recorder/wip/jtojnar/run: 3/4] build: add run target
- Date: Fri, 1 Feb 2019 14:43:34 +0000 (UTC)
commit 7067549b48e00245fbcdab12d1f61c21ef48926b
Author: Jan Tojnar <jtojnar gmail com>
Date: Fri Jan 18 03:17:14 2019 +0100
build: add run target
This will allow developers to run the application with `ninja -C build run`
without installation.
data/meson.build | 2 +-
meson.build | 2 +-
src/meson.build | 14 +++++++++++---
3 files changed, 13 insertions(+), 5 deletions(-)
---
diff --git a/data/meson.build b/data/meson.build
index ae11f53..1979659 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -30,7 +30,7 @@ configure_file(
install_dir: sound_recorder_schemadir
)
-gnome.compile_resources(
+data_res = gnome.compile_resources(
'@0@.data'.format(application_id),
'@0 data gresource xml'.format(application_id),
gresource_bundle: true,
diff --git a/meson.build b/meson.build
index 49bfd55..95b8672 100644
--- a/meson.build
+++ b/meson.build
@@ -29,8 +29,8 @@ i18n = import('i18n')
po_dir = join_paths(meson.source_root(), 'po')
-subdir('src')
subdir('data')
+subdir('src')
subdir('po')
meson.add_install_script(
diff --git a/src/meson.build b/src/meson.build
index e14efe6..b330904 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -20,7 +20,7 @@ app_conf.set('libdir', sound_recorder_libdir)
app_conf.set('PACKAGE_VERSION', meson.project_version())
app_conf.set('GJS', gjs_console)
-configure_file(
+app = configure_file(
input: 'org.gnome.SoundRecorder.in',
output: application_id,
install: true,
@@ -28,7 +28,7 @@ configure_file(
configuration: app_conf
)
-gnome.compile_resources(
+src_res = gnome.compile_resources(
application_id + '.src',
'org.gnome.SoundRecorder.src.gresource.xml',
source_dir: '.',
@@ -36,4 +36,12 @@ gnome.compile_resources(
gresource_bundle: true,
install: true,
install_dir: sound_recoder_pkgdatadir
-)
\ No newline at end of file
+)
+
+run_target('run',
+ command: app,
+ depends: [
+ data_res,
+ src_res,
+ ]
+)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]