diff --git a/tools/binpac/CMakeLists.txt b/tools/binpac/CMakeLists.txt index fb5f5b49ff..ead7550646 100644 --- a/tools/binpac/CMakeLists.txt +++ b/tools/binpac/CMakeLists.txt @@ -45,8 +45,17 @@ endif () ######################################################################## ## Dependency Configuration -find_package(FLEX REQUIRED) -find_package(BISON REQUIRED) +include(FindRequiredPackage) + +FindRequiredPackage(FLEX) +FindRequiredPackage(BISON) + +if (MISSING_PREREQS) + foreach (prereq ${MISSING_PREREQ_DESCS}) + message(SEND_ERROR ${prereq}) + endforeach () + message(FATAL_ERROR "Configuration aborted due to missing prerequisites") +endif () ######################################################################## ## System Introspection