Module: Mesa Branch: main Commit: 1df92ed2a68bf8ea331e44eddb6a194f82612297 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1df92ed2a68bf8ea331e44eddb6a194f82612297
Author: Jesse Natalie <[email protected]> Date: Fri Jul 22 15:47:46 2022 -0700 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 <[email protected]> Reviewed-by: Dylan Baker <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17724> --- 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
