From 1df92ed2a68bf8ea331e44eddb6a194f82612297 Mon Sep 17 00:00:00 2001 From: Jesse Natalie Date: Fri, 22 Jul 2022 15:47:46 -0700 Subject: [PATCH] meson: Don't include glsl compiler if flex/bison aren't found Use a disabler for not-found, which causes the GLSL targets to simply not be generated if the tools don't exist. Reviewed-by: Eric Engestrom Reviewed-by: Dylan Baker Part-of: --- meson.build | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 558c6ab49b4..ed58e6148d7 100644 --- a/meson.build +++ b/meson.build @@ -1938,7 +1938,7 @@ if build_machine.system() == 'windows' # _fileno functions) prog_flex = [prog_flex, '--wincompat'] else - prog_flex = [find_program('flex', 'lex', required : with_any_opengl)] + prog_flex = [find_program('flex', 'lex', required : with_any_opengl, disabler : true)] endif # Force flex to use const keyword in prototypes, as relies on __cplusplus or # __STDC__ macro to determine whether it's safe to use const keyword @@ -1953,13 +1953,13 @@ if build_machine.system() == 'windows' prog_bison = find_program('win_bison', required : false) if not prog_bison.found() - prog_bison = find_program('bison', 'yacc', required : with_any_opengl) + prog_bison = find_program('bison', 'yacc', required : with_any_opengl, disabler : true) endif else prog_bison = find_program('bison', required : false) if not prog_bison.found() - prog_bison = find_program('byacc', required : with_any_opengl) + prog_bison = find_program('byacc', required : with_any_opengl, disabler : true) yacc_is_bison = false endif @@ -1970,7 +1970,7 @@ else prog_bison = [prog_bison, '-Wno-deprecated'] endif - prog_flex = find_program('flex', required : with_any_opengl) + prog_flex = find_program('flex', required : with_any_opengl, disabler : true) prog_flex_cpp = prog_flex endif