diff options
| author | Simon Ser <contact@emersion.fr> | 2022-05-05 11:14:00 +0200 |
|---|---|---|
| committer | Simon Ser <contact@emersion.fr> | 2022-05-10 14:02:51 +0000 |
| commit | 9402afc353bb359b4d87622451abd635d111d356 (patch) | |
| tree | 49c8f6cc04562c72167fad00376d064336acd6da | |
| parent | cursor: use MAP_FAILED instead of hardcoded constant (diff) | |
| download | wayland-9402afc353bb359b4d87622451abd635d111d356.tar wayland-9402afc353bb359b4d87622451abd635d111d356.tar.gz wayland-9402afc353bb359b4d87622451abd635d111d356.tar.bz2 wayland-9402afc353bb359b4d87622451abd635d111d356.tar.lz wayland-9402afc353bb359b4d87622451abd635d111d356.tar.xz wayland-9402afc353bb359b4d87622451abd635d111d356.tar.zst wayland-9402afc353bb359b4d87622451abd635d111d356.zip | |
build: sanity check options
Fail when tests/documentation is enabled without libraries. Fail
when neither scanner nor libraries is enabled, because we don't
build anything in that case.
Signed-off-by: Simon Ser <contact@emersion.fr>
| -rw-r--r-- | doc/meson.build | 4 | ||||
| -rw-r--r-- | meson.build | 12 | ||||
| -rw-r--r-- | src/meson.build | 4 | ||||
| -rw-r--r-- | tests/meson.build | 4 |
4 files changed, 18 insertions, 6 deletions
diff --git a/doc/meson.build b/doc/meson.build index 57c7180..44fda2a 100644 --- a/doc/meson.build +++ b/doc/meson.build @@ -1,3 +1,7 @@ +if not get_option('libraries') + error('-Ddocumentation=true requires -Dlibraries=true') +endif + dot = find_program('dot') doxygen = find_program('doxygen') xsltproc = find_program('xsltproc') diff --git a/meson.build b/meson.build index e7fc3ee..8e951b9 100644 --- a/meson.build +++ b/meson.build @@ -118,12 +118,12 @@ subdir('src') if get_option('libraries') subdir('cursor') subdir('egl') - if get_option('tests') - subdir('tests') - endif - if get_option('documentation') - subdir('doc') - endif +endif +if get_option('tests') + subdir('tests') +endif +if get_option('documentation') + subdir('doc') endif if get_option('scanner') diff --git a/src/meson.build b/src/meson.build index 266c8b1..a601724 100644 --- a/src/meson.build +++ b/src/meson.build @@ -1,3 +1,7 @@ +if not (get_option('scanner') or get_option('libraries')) + error('Either -Dscanner=true or -Dlibraries=true is required') +endif + wayland_version_h = configuration_data() wayland_version_h.set('WAYLAND_VERSION', meson.project_version()) wayland_version_h.set('WAYLAND_VERSION_MAJOR', wayland_version[0].to_int()) diff --git a/tests/meson.build b/tests/meson.build index ffb5136..5efd6f7 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -1,3 +1,7 @@ +if not get_option('libraries') + error('-Dtests=true requires -Dlibraries=true') +endif + test_runner = static_library( 'test-runner', sources: [ |
