diff options
-rw-r--r-- | meson.build | 12 | ||||
-rw-r--r-- | meson_options.txt | 4 |
2 files changed, 11 insertions, 5 deletions
diff --git a/meson.build b/meson.build index 87105b7..ee0a8e5 100644 --- a/meson.build +++ b/meson.build @@ -1,5 +1,5 @@ project ('orc', 'c', version : '0.4.28.1', - meson_version : '>= 0.46.0', + meson_version : '>= 0.47.0', default_options : ['buildtype=debugoptimized', 'warning_level=1', 'c_std=gnu99'] ) @@ -133,8 +133,14 @@ if get_option('tests') subdir('testsuite') endif -if not meson.is_cross_build() and not get_option('disable_gtkdoc') and host_os != 'windows' - subdir('doc') +if build_machine.system() == 'windows' + message('Disabling gtk-doc while building on Windows') +else + if find_program('gtkdoc-scan', required : get_option('gtk_doc')).found() + subdir('doc') + else + message('Not building documentation as gtk-doc was not found') + endif endif pc_conf.set('prefix', get_option('prefix')) diff --git a/meson_options.txt b/meson_options.txt index e3f1bdc..8399e69 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,3 +1,3 @@ option('enable-backend', type : 'combo', choices : ['sse', 'mmx', 'neon', 'mips', 'altivec', 'c64x', 'all'], value : 'all') -option('disable_gtkdoc', type : 'boolean', value : false) -option('tests', type : 'boolean', value : true) +option('gtk_doc', type : 'feature', value : 'auto', yield : true, description : 'Generate API documentation with gtk-doc') +option('tests', type : 'boolean', value : true, yield : true) |