meson: simplify some more build options by using features
Signed-off-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Simon Ser <contact@emersion.fr>main
parent
26eb15165b
commit
a64a176cfd
|
@ -192,8 +192,6 @@ x86_64-freebsd-container_prep:
|
||||||
script:
|
script:
|
||||||
- meson build
|
- meson build
|
||||||
--auto-features=enabled
|
--auto-features=enabled
|
||||||
-D cairo-tests=true
|
|
||||||
-D man-pages=true
|
|
||||||
-D udev=true
|
-D udev=true
|
||||||
- ninja -C build
|
- ninja -C build
|
||||||
- ninja -C build test
|
- ninja -C build test
|
||||||
|
@ -215,7 +213,7 @@ x86_64-freebsd-container_prep:
|
||||||
# the workspace to see details about the failed tests.
|
# the workspace to see details about the failed tests.
|
||||||
- |
|
- |
|
||||||
set +e
|
set +e
|
||||||
/app/vmctl exec "pkg info; cd $CI_PROJECT_NAME ; meson build --auto-features=enabled -D nouveau=disabled -D cairo-tests=true -D man-pages=true -D valgrind=false && ninja -C build"
|
/app/vmctl exec "pkg info; cd $CI_PROJECT_NAME ; meson build --auto-features=enabled -D nouveau=disabled -D valgrind=disabled && ninja -C build"
|
||||||
set -ex
|
set -ex
|
||||||
scp -r vm:$CI_PROJECT_NAME/build/meson-logs .
|
scp -r vm:$CI_PROJECT_NAME/build/meson-logs .
|
||||||
/app/vmctl exec "ninja -C $CI_PROJECT_NAME/build install"
|
/app/vmctl exec "ninja -C $CI_PROJECT_NAME/build install"
|
||||||
|
|
34
meson.build
34
meson.build
|
@ -237,30 +237,18 @@ libdrm_c_args = cc.get_supported_arguments([
|
||||||
|
|
||||||
dep_pciaccess = dependency('pciaccess', version : '>= 0.10', required : with_intel)
|
dep_pciaccess = dependency('pciaccess', version : '>= 0.10', required : with_intel)
|
||||||
dep_cunit = dependency('cunit', version : '>= 2.1', required : false)
|
dep_cunit = dependency('cunit', version : '>= 2.1', required : false)
|
||||||
_cairo_tests = get_option('cairo-tests')
|
dep_cairo = dependency('cairo', required : get_option('cairo-tests'))
|
||||||
if _cairo_tests != 'false'
|
with_cairo_tests = dep_cairo.found()
|
||||||
dep_cairo = dependency('cairo', required : _cairo_tests == 'true')
|
|
||||||
with_cairo_tests = dep_cairo.found()
|
|
||||||
else
|
|
||||||
dep_cairo = []
|
|
||||||
with_cairo_tests = false
|
|
||||||
endif
|
|
||||||
_valgrind = get_option('valgrind')
|
|
||||||
if _valgrind != 'false'
|
|
||||||
if with_freedreno
|
|
||||||
dep_valgrind = dependency('valgrind', required : _valgrind == 'true', version : '>=3.10.0')
|
|
||||||
else
|
|
||||||
dep_valgrind = dependency('valgrind', required : _valgrind == 'true')
|
|
||||||
endif
|
|
||||||
with_valgrind = dep_valgrind.found()
|
|
||||||
else
|
|
||||||
dep_valgrind = []
|
|
||||||
with_valgrind = false
|
|
||||||
endif
|
|
||||||
|
|
||||||
with_man_pages = get_option('man-pages')
|
valgrind_version = []
|
||||||
prog_rst2man = find_program('rst2man', 'rst2man.py', required: with_man_pages == 'true')
|
if with_freedreno
|
||||||
with_man_pages = with_man_pages != 'false' and prog_rst2man.found()
|
valgrind_version = '>=3.10.0'
|
||||||
|
endif
|
||||||
|
dep_valgrind = dependency('valgrind', required : get_option('valgrind'), version : valgrind_version)
|
||||||
|
with_valgrind = dep_valgrind.found()
|
||||||
|
|
||||||
|
prog_rst2man = find_program('rst2man', 'rst2man.py', required: get_option('man-pages'))
|
||||||
|
with_man_pages = prog_rst2man.found()
|
||||||
|
|
||||||
config.set10('HAVE_VISIBILITY', cc.has_function_attribute('visibility:hidden'))
|
config.set10('HAVE_VISIBILITY', cc.has_function_attribute('visibility:hidden'))
|
||||||
|
|
||||||
|
|
|
@ -79,23 +79,17 @@ option(
|
||||||
)
|
)
|
||||||
option(
|
option(
|
||||||
'cairo-tests',
|
'cairo-tests',
|
||||||
type : 'combo',
|
type : 'feature',
|
||||||
value : 'auto',
|
|
||||||
choices : ['true', 'false', 'auto'],
|
|
||||||
description : 'Enable support for Cairo rendering in tests.',
|
description : 'Enable support for Cairo rendering in tests.',
|
||||||
)
|
)
|
||||||
option(
|
option(
|
||||||
'man-pages',
|
'man-pages',
|
||||||
type : 'combo',
|
type : 'feature',
|
||||||
value : 'auto',
|
|
||||||
choices : ['true', 'false', 'auto'],
|
|
||||||
description : 'Enable manpage generation and installation.',
|
description : 'Enable manpage generation and installation.',
|
||||||
)
|
)
|
||||||
option(
|
option(
|
||||||
'valgrind',
|
'valgrind',
|
||||||
type : 'combo',
|
type : 'feature',
|
||||||
value : 'auto',
|
|
||||||
choices : ['true', 'false', 'auto'],
|
|
||||||
description : 'Build libdrm with valgrind support.',
|
description : 'Build libdrm with valgrind support.',
|
||||||
)
|
)
|
||||||
option(
|
option(
|
||||||
|
|
Loading…
Reference in New Issue