From 4fe1efa1a96684ab70f2e8f2b72901355c708372 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Thu, 18 Feb 2016 06:16:11 -0500 Subject: [PATCH] Error out if bison is not found on non-Windows operating systems. We cannot just default to use tools/bison.exe when it is not on Windows. --- glslang/CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/glslang/CMakeLists.txt b/glslang/CMakeLists.txt index 878eca5d..803203df 100644 --- a/glslang/CMakeLists.txt +++ b/glslang/CMakeLists.txt @@ -66,8 +66,12 @@ set(HEADERS find_package(BISON) if(NOT BISON_FOUND) - set(BISON_EXECUTABLE ../tools/bison.exe) - message("bison not found. Assuming it is at ${BISON_EXECUTABLE}") + if (WIN32) + set(BISON_EXECUTABLE ../tools/bison.exe) + message("bison not found. Assuming it is at ${BISON_EXECUTABLE}") + else() + message(FATAL_ERROR "bison required but not found. Please install via your package management tool.") + endif() endif() # Always use a custom command since our use of --defines isn't assumed by CMake's BISON_TARGET,