mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-11-02 09:01:39 -05:00
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>
This commit is contained in:
parent
2dcc35af81
commit
9402afc353
4 changed files with 18 additions and 6 deletions
|
|
@ -1,3 +1,7 @@
|
||||||
|
if not get_option('libraries')
|
||||||
|
error('-Ddocumentation=true requires -Dlibraries=true')
|
||||||
|
endif
|
||||||
|
|
||||||
dot = find_program('dot')
|
dot = find_program('dot')
|
||||||
doxygen = find_program('doxygen')
|
doxygen = find_program('doxygen')
|
||||||
xsltproc = find_program('xsltproc')
|
xsltproc = find_program('xsltproc')
|
||||||
|
|
|
||||||
|
|
@ -118,12 +118,12 @@ subdir('src')
|
||||||
if get_option('libraries')
|
if get_option('libraries')
|
||||||
subdir('cursor')
|
subdir('cursor')
|
||||||
subdir('egl')
|
subdir('egl')
|
||||||
if get_option('tests')
|
endif
|
||||||
|
if get_option('tests')
|
||||||
subdir('tests')
|
subdir('tests')
|
||||||
endif
|
endif
|
||||||
if get_option('documentation')
|
if get_option('documentation')
|
||||||
subdir('doc')
|
subdir('doc')
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('scanner')
|
if get_option('scanner')
|
||||||
|
|
|
||||||
|
|
@ -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 = configuration_data()
|
||||||
wayland_version_h.set('WAYLAND_VERSION', meson.project_version())
|
wayland_version_h.set('WAYLAND_VERSION', meson.project_version())
|
||||||
wayland_version_h.set('WAYLAND_VERSION_MAJOR', wayland_version[0].to_int())
|
wayland_version_h.set('WAYLAND_VERSION_MAJOR', wayland_version[0].to_int())
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,7 @@
|
||||||
|
if not get_option('libraries')
|
||||||
|
error('-Dtests=true requires -Dlibraries=true')
|
||||||
|
endif
|
||||||
|
|
||||||
test_runner = static_library(
|
test_runner = static_library(
|
||||||
'test-runner',
|
'test-runner',
|
||||||
sources: [
|
sources: [
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue