meson: Provide options to disable test/docs
It can be desirable to disable the compilation and processing of both the test suite and documentation for use cases such as packaging to an embedded target. Provide a new meson_options.txt file to allow disabling either or both of the tests and documentation components of libcamera. These options can be provided at the initial configuration time, for example: meson build -Dtests=false -Ddocumentation=false or by reconfiguring an existing build tree: cd build meson configure -Ddocumentation=false meson configure -Dtests=false Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
parent
651f6973a0
commit
945478dbc0
2 changed files with 10 additions and 2 deletions
10
meson.build
10
meson.build
|
@ -27,9 +27,15 @@ libcamera_includes = include_directories('include')
|
|||
|
||||
subdir('include')
|
||||
subdir('src')
|
||||
subdir('test')
|
||||
subdir('utils')
|
||||
subdir('Documentation')
|
||||
|
||||
if get_option('tests')
|
||||
subdir('test')
|
||||
endif
|
||||
|
||||
if get_option('documentation')
|
||||
subdir('Documentation')
|
||||
endif
|
||||
|
||||
pkg_mod = import('pkgconfig')
|
||||
pkg_mod.generate(libraries : libcamera,
|
||||
|
|
2
meson_options.txt
Normal file
2
meson_options.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
option('tests', type : 'boolean')
|
||||
option('documentation', type : 'boolean')
|
Loading…
Add table
Add a link
Reference in a new issue