]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
cmake: fix dev warning due to mismatched arg
authorDmitry Atamanov <dataman@tutanota.com>
Fri, 10 Feb 2023 17:44:36 +0000 (22:44 +0500)
committerJay Satiro <raysatiro@yahoo.com>
Sun, 12 Feb 2023 06:45:48 +0000 (01:45 -0500)
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

CMake/FindBrotli.cmake

index 7da3cbb33d333075bb54737967e90b9b63081cf9..11ab7f82545513f90d4877ddb7a5edd675727fd0 100644 (file)
@@ -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})