summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Lundblad <ml@update.uu.se>2021-05-08 12:54:39 +0200
committerMarcus Lundblad <ml@update.uu.se>2021-05-08 12:54:39 +0200
commit5c7ff37628f01e1abc065e1c02a5640b0531a260 (patch)
treee809140879eccd0e9024795d39fedb3e06be9f2f
parent3d8f4d063ccbd4b7d7641e74911dc6fd934dc8af (diff)
downloadgnome-maps-wip/mlundblad/single-gjs-find-program.tar.gz
meson: Call find_program() once for GJSwip/mlundblad/single-gjs-find-program
Avoiding multiple calls to find_program() for the generated test scripts.
-rw-r--r--meson.build2
-rw-r--r--src/meson.build2
-rw-r--r--tests/meson.build4
3 files changed, 5 insertions, 3 deletions
diff --git a/meson.build b/meson.build
index 32597b3f..a8b297c2 100644
--- a/meson.build
+++ b/meson.build
@@ -49,6 +49,8 @@ top_inc = include_directories('.')
cc = meson.get_compiler('c')
+gjs = find_program('gjs')
+
subdir('po')
subdir('src')
subdir('lib')
diff --git a/src/meson.build b/src/meson.build
index 5cc7e5e3..49706a85 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -1,5 +1,5 @@
script_conf = configuration_data()
-script_conf.set('GJS', find_program('gjs').path())
+script_conf.set('GJS', gjs.path())
script_conf.set('PACKAGE_VERSION', version)
script_conf.set('libdir', libdir)
script_conf.set('prefix', prefix)
diff --git a/tests/meson.build b/tests/meson.build
index 3961d73f..e4b07369 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -4,7 +4,7 @@ tests = ['addressTest', 'boundingBoxTest', 'colorTest', 'osmNamesTest',
foreach test : tests
script_conf = configuration_data()
- script_conf.set('GJS', find_program('gjs').path())
+ script_conf.set('GJS', gjs.path())
script_conf.set('PACKAGE_VERSION', version)
script_conf.set('libdir', libdir)
script_conf.set('prefix', prefix)
@@ -19,7 +19,7 @@ foreach test : tests
endforeach
foreach test : tests
- test(test, find_program('gjs'),
+ test(test, gjs,
args: ['-I', meson.source_root() + '/src/', '-I',
meson.source_root() + '/tests/',
'tests/@0@'.format(test)],