Allow package to be specified as required

Although CMake prefers the uppercase variant variables, and the
find_package_handle_standard_args will convert to them for us, the
part that parses REQUIRED and QUIET arguments to find_package still
only uses the package name verbatim (sic).
This commit is contained in:
Roland Kaufmann
2013-10-23 21:44:51 +02:00
parent bb4fffc227
commit 7e9c45b765
2 changed files with 4 additions and 0 deletions

View File

@@ -76,6 +76,8 @@ endif ()
# if the test program didn't compile, but was required to do so, bail
# out now and display an error; otherwise limp on
set (CJSON_FIND_REQUIRED ${cjson_FIND_REQUIRED})
set (CJSON_FIND_QUIETLY ${cjson_FIND_QUIETLY})
find_package_handle_standard_args (CJSON
DEFAULT_MSG
CJSON_INCLUDE_DIRS CJSON_LIBRARIES HAVE_CJSON

View File

@@ -132,6 +132,8 @@ endif ()
# if the test program didn't compile, but was required to do so, bail
# out now and display an error; otherwise limp on
set (OPM_PARSER_FIND_REQUIRED ${opm-parser_FIND_REQUIRED})
set (OPM_PARSER_FIND_QUIETLY ${opm-parser_FIND_QUIETLY})
find_package_handle_standard_args (OPM_PARSER
DEFAULT_MSG
OPM_PARSER_INCLUDE_DIR OPM_PARSER_LIBRARIES HAVE_OPM_PARSER