diff --git a/doxygen/meson.build b/doxygen/meson.build index afc0e4989..7659de35c 100644 --- a/doxygen/meson.build +++ b/doxygen/meson.build @@ -1,3 +1,8 @@ +doxygen = find_program('doxygen', required: get_option('doxygen')) +if not doxygen.found() + subdir_done() +endif + cdata.set('DOXYGEN_OUTPUT_DIRECTORY', meson.current_build_dir()) doxygen_conf = configure_file( @@ -7,4 +12,4 @@ doxygen_conf = configure_file( ) run_target('doxygen', - command : ['doxygen', doxygen_conf]) + command : [doxygen, doxygen_conf]) diff --git a/meson.build b/meson.build index 57c929b58..5f80831a7 100644 --- a/meson.build +++ b/meson.build @@ -840,9 +840,7 @@ check_dep = dependency('check', version : '>= 0.9.10', required : get_option('te # Subdirs -if get_option('doxygen') - subdir('doxygen') -endif +subdir('doxygen') if get_option('client') subdir('po') endif diff --git a/meson_options.txt b/meson_options.txt index 0ab985d2a..7cf4606a5 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -5,7 +5,7 @@ option('client', type : 'boolean', value : true, description : 'Build and install pulseaudio client libraries and utilities') option('doxygen', - type : 'boolean', value : true, + type : 'feature', description : 'Enable building and installation of documentation generated with doxygen') option('gcov', type : 'boolean', value : false, @@ -14,7 +14,7 @@ option('man', type : 'boolean', description : 'Enable building and installation of man pages') option('tests', - type : 'boolean', + type : 'feature', description : 'Enable unit tests') option('system_user', diff --git a/src/meson.build b/src/meson.build index 2069d2803..943ad4990 100644 --- a/src/meson.build +++ b/src/meson.build @@ -224,7 +224,5 @@ if get_option('daemon') subdir('daemon') subdir('modules') endif -if get_option('tests') - subdir('tests') -endif +subdir('tests') subdir('utils') diff --git a/src/tests/meson.build b/src/tests/meson.build index bbdd23130..06b191693 100644 --- a/src/tests/meson.build +++ b/src/tests/meson.build @@ -1,3 +1,7 @@ +if not check_dep.found() + subdir_done() +endif + # Note that a few tests have dependencies on src/modules. # # The syntax for tests declaration is: