diff options
author | Erik Faye-Lund <[email protected]> | 2017-10-25 10:02:38 +0200 |
---|---|---|
committer | Erik Faye-Lund <[email protected]> | 2017-10-31 15:44:13 +0100 |
commit | 5c2ff5773a707519f6a773126f201c4e1e8a42d7 (patch) | |
tree | 2dbfa8079ff6d1d73aa3bf9a8b2388724de162a3 | |
parent | 5010436e09f3a7acae679e192d2fe65f04c87c79 (diff) |
meson: do not search for needless deps
If we don't want to use these deps, there's no good reason to search
for them in the first place. This should shave a bit of time for the
initial build.
Signed-off-by: Erik Faye-Lund <[email protected]>
Reviewed-by: Eric Engestrom <[email protected]>
-rw-r--r-- | meson.build | 20 | ||||
-rw-r--r-- | meson_options.txt | 14 |
2 files changed, 22 insertions, 12 deletions
diff --git a/meson.build b/meson.build index 24d997b3e0a..d6a2d83b565 100644 --- a/meson.build +++ b/meson.build @@ -691,9 +691,13 @@ if with_glvnd endif # TODO: make this conditional -dep_valgrind = dependency('valgrind', required : false) -if dep_valgrind.found() and with_valgrind - pre_args += '-DHAVE_VALGRIND' +if with_valgrind != 'false' + dep_valgrind = dependency('valgrind', required : with_valgrind == 'true') + if dep_valgrind.found() + pre_args += '-DHAVE_VALGRIND' + endif +else + dep_valgrind = [] endif # pthread stubs. Lets not and say we didn't @@ -709,9 +713,13 @@ endif # TODO: llvm-prefix and llvm-shared-libs -dep_unwind = dependency('libunwind', required : false) -if dep_unwind.found() and with_libunwind - pre_args += '-DHAVE_LIBUNWIND' +if with_libunwind != 'false' + dep_unwind = dependency('libunwind', required : with_libunwind == 'true') + if dep_unwind.found() + pre_args += '-DHAVE_LIBUNWIND' + endif +else + dep_unwind = [] endif # TODO: flags for opengl, gles, dri diff --git a/meson_options.txt b/meson_options.txt index 74f1e71bf43..f6f21b4c02d 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -138,15 +138,17 @@ option( ) option( 'valgrind', - type : 'boolean', - value : true, - description : 'Build with valgrind support if possible' + type : 'combo', + value : 'auto', + choices : ['auto', 'true', 'false'], + description : 'Build with valgrind support' ) option( 'libunwind', - type : 'boolean', - value : true, - description : 'Use libunwind for stack-traces if possible' + type : 'combo', + value : 'auto', + choices : ['auto', 'true', 'false'], + description : 'Use libunwind for stack-traces' ) option( 'build-tests', |