summaryrefslogtreecommitdiffstats
path: root/Utilities/cmcurl/CMake/FindBrotli.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Utilities/cmcurl/CMake/FindBrotli.cmake')
-rw-r--r--Utilities/cmcurl/CMake/FindBrotli.cmake20
1 files changed, 20 insertions, 0 deletions
diff --git a/Utilities/cmcurl/CMake/FindBrotli.cmake b/Utilities/cmcurl/CMake/FindBrotli.cmake
new file mode 100644
index 0000000..351b8f7
--- /dev/null
+++ b/Utilities/cmcurl/CMake/FindBrotli.cmake
@@ -0,0 +1,20 @@
+include(FindPackageHandleStandardArgs)
+
+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
+ FOUND_VAR
+ BROTLI_FOUND
+ REQUIRED_VARS
+ BROTLIDEC_LIBRARY
+ BROTLICOMMON_LIBRARY
+ BROTLI_INCLUDE_DIR
+ FAIL_MESSAGE
+ "Could NOT find BROTLI"
+)
+
+set(BROTLI_INCLUDE_DIRS ${BROTLI_INCLUDE_DIR})
+set(BROTLI_LIBRARIES ${BROTLICOMMON_LIBRARY} ${BROTLIDEC_LIBRARY})