diff options
author | Curl Upstream <curl-library@cool.haxx.se> | 2018-05-15 14:43:56 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-05-18 14:16:12 (GMT) |
commit | d431136e029c652f5913bcebeaab3b9236b114c4 (patch) | |
tree | c0838b4432a3786a323c94a680bb16f644198311 /CMake | |
parent | af9e654045f11028e50dac4781e297834129a749 (diff) | |
download | CMake-d431136e029c652f5913bcebeaab3b9236b114c4.zip CMake-d431136e029c652f5913bcebeaab3b9236b114c4.tar.gz CMake-d431136e029c652f5913bcebeaab3b9236b114c4.tar.bz2 |
curl 2018-05-15 (cb013830)
Code extracted from:
https://github.com/curl/curl.git
at commit cb013830383f1ccc9757aba36bc32df5ec281c02 (curl-7_60_0).
Diffstat (limited to 'CMake')
-rw-r--r-- | CMake/FindBrotli.cmake | 20 | ||||
-rw-r--r-- | CMake/Utilities.cmake | 2 |
2 files changed, 21 insertions, 1 deletions
diff --git a/CMake/FindBrotli.cmake b/CMake/FindBrotli.cmake new file mode 100644 index 0000000..351b8f7 --- /dev/null +++ b/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}) diff --git a/CMake/Utilities.cmake b/CMake/Utilities.cmake index 8b6276d..005b166 100644 --- a/CMake/Utilities.cmake +++ b/CMake/Utilities.cmake @@ -19,7 +19,7 @@ function(LIST_SPACES_APPEND_ONCE LIST_NAME) set(${LIST_NAME} "${NEW_LIST_SPACE}" PARENT_SCOPE) endfunction() -# Convinience function that does the same as LIST(FIND ...) but with a TRUE/FALSE return value. +# Convenience function that does the same as LIST(FIND ...) but with a TRUE/FALSE return value. # Ex: IN_STR_LIST(MY_LIST "Searched item" WAS_FOUND) function(IN_STR_LIST LIST_NAME ITEM_SEARCHED RETVAL) list(FIND ${LIST_NAME} ${ITEM_SEARCHED} FIND_POS) |