diff options
author | Tim-Philipp Müller <tim@centricular.com> | 2017-12-06 20:42:39 +0000 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2017-12-06 20:43:04 +0000 |
commit | 0dae3a007d25a2120a9d2cfaada6c5efc4cc2f5a (patch) | |
tree | 9e40d5de05ae6caee1b8e41862f74c63ffb16557 | |
parent | 1555143299ccedb0ff8ed9e7ee1c59285b1b13f4 (diff) |
meson: build more tests and add options to disable tests and examples
-rw-r--r-- | meson.build | 8 | ||||
-rw-r--r-- | meson_options.txt | 4 | ||||
-rw-r--r-- | tests/meson.build | 9 |
3 files changed, 19 insertions, 2 deletions
diff --git a/meson.build b/meson.build index 96f704b..9117a96 100644 --- a/meson.build +++ b/meson.build @@ -89,6 +89,10 @@ gir_init_section = [ '--add-init-section=extern void gst_init(gint*,gchar**);' + 'gst_init(NULL,NULL);' ] subdir('gst') -subdir('tests') -subdir('examples') +if get_option('tests') + subdir('tests') +endif +if get_option('examples') + subdir('examples') +endif subdir('pkgconfig') diff --git a/meson_options.txt b/meson_options.txt index 16265d3..cf9d95f 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -5,3 +5,7 @@ option('with-package-name', type : 'string', description : 'package name to use in plugins') option('with-package-origin', type : 'string', value : 'Unknown package origin', description : 'package origin URL to use in plugins') +option('tests', type : 'boolean', value : true, + description : 'Build and enable unit tests') +option('examples', type : 'boolean', value : true, + description : 'Build the examples') diff --git a/tests/meson.build b/tests/meson.build index cd3aa67..f87683d 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -1,3 +1,12 @@ if host_machine.system() != 'windows' subdir('check') endif + +test_cleanup_exe = executable('test-cleanup', 'test-cleanup.c', + dependencies: gst_rtsp_server_dep) + +test_reuse_exe = executable('test-reuse', 'test-reuse.c', + dependencies: gst_rtsp_server_dep) + +test('test-cleanup', test_cleanup_exe) +test('test-reuse', test_reuse_exe) |