[gnome-sound-recorder/wip/jtojnar/run: 20/21] build: add run target
- From: Jan Tojnar <jtojnar src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-sound-recorder/wip/jtojnar/run: 20/21] build: add run target
- Date: Tue, 5 Feb 2019 19:48:14 +0000 (UTC)
commit 1c420c580d65395726483beb9c28799df829643f
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 | 12 ++++++++++--
3 files changed, 12 insertions(+), 4 deletions(-)
---
diff --git a/data/meson.build b/data/meson.build
index 3ab1144..19bf7b7 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -41,7 +41,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 cdc4b94..fbd14ec 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 518ebf1..9e7beeb 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -19,7 +19,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,
@@ -27,7 +27,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,3 +36,11 @@ gnome.compile_resources(
install: true,
install_dir: sound_recoder_pkgdatadir
)
+
+run_target('run',
+ command: app,
+ depends: [
+ data_res,
+ src_res,
+ ]
+)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]