aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIgor Gnatenko2018-02-19 06:55:27 -0600
committerEric Engestrom2018-02-20 04:02:50 -0600
commit9411f8ea03a4c019a0069845545cae45136596fc (patch)
treea1230f9eddbc31c34aeafbd5dc67d7c6a33f62ba /meson.build
parent33a2851ab9bc3cd8a68bedf4cf0fdc549b0f3596 (diff)
downloadexternal-libgbm-9411f8ea03a4c019a0069845545cae45136596fc.tar.gz
external-libgbm-9411f8ea03a4c019a0069845545cae45136596fc.tar.xz
external-libgbm-9411f8ea03a4c019a0069845545cae45136596fc.zip
meson: do not use cairo/valgrind if disabled
-Dcairo-tests=false currently results into enabling cairo support if it was found. Same for valgrind. v2: * Use underscore-prefixed variables to not change type of variable * Use empty array for "fake" dependency instead of real empty object v3: * Fix typo Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build24
1 files changed, 18 insertions, 6 deletions
diff --git a/meson.build b/meson.build
index 166559e8..7f786a8c 100644
--- a/meson.build
+++ b/meson.build
@@ -32,8 +32,6 @@ pkg = import('pkgconfig')
32with_udev = get_option('udev') 32with_udev = get_option('udev')
33with_freedreno_kgsl = get_option('freedreno-kgsl') 33with_freedreno_kgsl = get_option('freedreno-kgsl')
34with_install_tests = get_option('install-test-programs') 34with_install_tests = get_option('install-test-programs')
35with_cairo_tests = get_option('cairo-tests')
36with_valgrind = get_option('valgrind')
37 35
38config = configuration_data() 36config = configuration_data()
39 37
@@ -226,8 +224,22 @@ endforeach
226 224
227dep_pciaccess = dependency('pciaccess', version : '>= 0.10', required : with_intel) 225dep_pciaccess = dependency('pciaccess', version : '>= 0.10', required : with_intel)
228dep_cunit = dependency('cunit', version : '>= 2.1', required : false) 226dep_cunit = dependency('cunit', version : '>= 2.1', required : false)
229dep_cairo = dependency('cairo', required : with_cairo_tests == 'true') 227_cairo_tests = get_option('cairo-tests')
230dep_valgrind = dependency('valgrind', required : with_valgrind == 'true') 228if _cairo_tests != 'false'
229 dep_cairo = dependency('cairo', required : _cairo_tests == 'true')
230 with_cairo_tests = dep_cairo.found()
231else
232 dep_cairo = []
233 with_cairo_tests = false
234endif
235_valgrind = get_option('valgrind')
236if _valgrind != 'false'
237 dep_valgrind = dependency('valgrind', required : _valgrind == 'true')
238 with_valgrind = dep_valgrind.found()
239else
240 dep_valgrind = []
241 with_valgrind = false
242endif
231 243
232with_man_pages = get_option('man-pages') 244with_man_pages = get_option('man-pages')
233prog_xslt = find_program('xsltproc', required : with_man_pages == 'true') 245prog_xslt = find_program('xsltproc', required : with_man_pages == 'true')
@@ -259,8 +271,8 @@ foreach t : [
259 [with_radeon, 'RADEON'], 271 [with_radeon, 'RADEON'],
260 [with_vc4, 'VC4'], 272 [with_vc4, 'VC4'],
261 [with_vmwgfx, 'VMWGFX'], 273 [with_vmwgfx, 'VMWGFX'],
262 [dep_cairo.found(), 'CAIRO'], 274 [with_cairo_tests, 'CAIRO'],
263 [dep_valgrind.found(), 'VALGRIND'], 275 [with_valgrind, 'VALGRIND'],
264 ] 276 ]
265 config.set10('HAVE_@0@'.format(t[1]), t[0]) 277 config.set10('HAVE_@0@'.format(t[1]), t[0])
266endforeach 278endforeach