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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user