meson: move the "build this?" checks into the subdirs

Let's decide on what to build in the doc/ and test/ directory rather
than in the main file.
This commit is contained in:
Peter Hutterer 2023-03-07 11:08:13 +10:00
parent 7810be8a80
commit 25e36eb24e
3 changed files with 11 additions and 9 deletions

View file

@ -1,3 +1,7 @@
if not get_option('documentation')
subdir_done()
endif
doxygen = find_program('doxygen', required : false)
if not doxygen.found()
error('Program "doxygen" not found or not executable. Try building with -Ddocumentation=false')

View file

@ -62,18 +62,12 @@ config_h.set10('HAVE_LIBXKBCOMMON', dep_libxkbcommon.found())
dep_libevdev = dependency('libevdev', required: false)
config_h.set10('HAVE_LIBEVDEV', dep_libevdev.found())
dep_systemd = dependency('libsystemd', required: get_option('liboeffis'))
configure_file(output: 'config.h', configuration: config_h)
subdir('proto')
subdir('src')
subdir('tools')
subdir('test')
subdir('doc')
# tests
if get_option('tests')
subdir('test')
endif
configure_file(output: 'config.h', configuration: config_h)
if get_option('documentation')
subdir('doc')
endif

View file

@ -1,3 +1,7 @@
if not get_option('tests')
subdir_done()
endif
subproject('munit', default_options: 'werror=false')
munit = dependency('munit', fallback: ['munit', 'munit_dep'])