From: Dmitry Atamanov Date: Fri, 10 Feb 2023 17:44:36 +0000 (+0500) Subject: cmake: fix dev warning due to mismatched arg X-Git-Tag: curl-7_88_0~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1df2dfb514cd3943a2981425eda3ffb179c7d9e8;p=thirdparty%2Fcurl.git cmake: fix dev warning due to mismatched arg The package name passed to find_package_handle_standard_args (BROTLI) does not match the name of the calling package (Brotli). This can lead to problems in calling code that expects find_package result variables (e.g., _FOUND) to follow a certain pattern. Closes https://github.com/curl/curl/pull/10471 --- diff --git a/CMake/FindBrotli.cmake b/CMake/FindBrotli.cmake index 7da3cbb33d..11ab7f8254 100644 --- a/CMake/FindBrotli.cmake +++ b/CMake/FindBrotli.cmake @@ -28,7 +28,7 @@ find_path(BROTLI_INCLUDE_DIR "brotli/decode.h") find_library(BROTLICOMMON_LIBRARY NAMES brotlicommon) find_library(BROTLIDEC_LIBRARY NAMES brotlidec) -find_package_handle_standard_args(BROTLI +find_package_handle_standard_args(Brotli FOUND_VAR BROTLI_FOUND REQUIRED_VARS @@ -36,7 +36,7 @@ find_package_handle_standard_args(BROTLI BROTLICOMMON_LIBRARY BROTLI_INCLUDE_DIR FAIL_MESSAGE - "Could NOT find BROTLI" + "Could NOT find Brotli" ) set(BROTLI_INCLUDE_DIRS ${BROTLI_INCLUDE_DIR})