From 7e9c45b765d8e3f7404697d76537043a49f956af Mon Sep 17 00:00:00 2001 From: Roland Kaufmann Date: Wed, 23 Oct 2013 21:44:51 +0200 Subject: [PATCH] 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). --- cmake/Modules/Findcjson.cmake | 2 ++ cmake/Modules/Findopm-parser.cmake | 2 ++ 2 files changed, 4 insertions(+) diff --git a/cmake/Modules/Findcjson.cmake b/cmake/Modules/Findcjson.cmake index 956de05a0..fba8c733f 100644 --- a/cmake/Modules/Findcjson.cmake +++ b/cmake/Modules/Findcjson.cmake @@ -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 diff --git a/cmake/Modules/Findopm-parser.cmake b/cmake/Modules/Findopm-parser.cmake index 8e5c9012d..2911addaf 100644 --- a/cmake/Modules/Findopm-parser.cmake +++ b/cmake/Modules/Findopm-parser.cmake @@ -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