summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2018-04-29 18:18:07 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2018-04-29 18:18:07 +0100
commit4c76635e1f19c6d1919d4ea94f6b00f97b996665 (patch)
tree6e6ec6889be96e074686b27d371931385cc015b8
parentd1f5129e8d77c6e28b193466ca074daa9f554dff (diff)
downloadgdk-pixbuf-4c76635e1f19c6d1919d4ea94f6b00f97b996665.tar.gz
meson: Add option for installing tests
Like the Autotools build allows us to decide whether the tests should be installed in a known location, we should have this option for the Meson build.
-rw-r--r--meson_options.txt4
-rw-r--r--tests/meson.build10
2 files changed, 10 insertions, 4 deletions
diff --git a/meson_options.txt b/meson_options.txt
index a5aa93be0..9f6b6505e 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -42,3 +42,7 @@ option('native_windows_loaders',
description: 'Use Windows system components to handle BMP, EMF, GIF, ICO, JPEG, TIFF and WMF images, overriding jpeg and tiff. To build this into gdk-pixbuf, pass in windows" with the other loaders to build in or use "all" with the builtin_loaders option',
type: 'boolean',
value: false)
+option('installed_tests',
+ description: 'Install the test suite',
+ type: 'boolean',
+ value: true)
diff --git a/tests/meson.build b/tests/meson.build
index c99336018..e134c3290 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -89,8 +89,10 @@ test_data = [
installed_test_bindir = join_paths(gdk_pixbuf_libexecdir, 'installed-tests', meson.project_name())
installed_test_datadir = join_paths(gdk_pixbuf_datadir, 'installed-tests', meson.project_name())
-install_data(test_data, install_dir: installed_test_bindir)
-install_subdir('test-images', install_dir: installed_test_bindir)
+if get_option('installed_tests')
+ install_data(test_data, install_dir: installed_test_bindir)
+ install_subdir('test-images', install_dir: installed_test_bindir)
+endif
test_deps = gdk_pixbuf_deps + [ gdkpixbuf_dep ]
@@ -110,7 +112,7 @@ foreach t: installed_tests
'--testbin=@0@'.format(test_name),
'@OUTPUT@',
],
- install: true,
+ install: get_option('installed_tests'),
install_dir: installed_test_datadir,
)
@@ -121,7 +123,7 @@ foreach t: installed_tests
gdk_pixbuf_inc,
],
c_args: common_cflags,
- install: true,
+ install: get_option('installed_tests'),
install_dir: installed_test_bindir,
)