2022-12-20 07:00:59 +08:00
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
|
|
--- a/CMakeLists.txt
|
|
|
|
+++ b/CMakeLists.txt
|
2023-05-09 09:23:01 +08:00
|
|
|
@@ -131,9 +131,9 @@ endif()
|
2022-12-20 07:00:59 +08:00
|
|
|
# Adds our cmake folder to the search path for find_package
|
|
|
|
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
|
|
|
if(HTTPLIB_REQUIRE_BROTLI)
|
|
|
|
- find_package(Brotli COMPONENTS encoder decoder common REQUIRED)
|
|
|
|
+ find_package(unofficial-brotli CONFIG REQUIRED)
|
|
|
|
elseif(HTTPLIB_USE_BROTLI_IF_AVAILABLE)
|
|
|
|
- find_package(Brotli COMPONENTS encoder decoder common QUIET)
|
|
|
|
+ find_package(unofficial-brotli CONFIG QUIET)
|
|
|
|
endif()
|
|
|
|
# Just setting this variable here for people building in-tree
|
|
|
|
if(Brotli_FOUND)
|
2023-05-09 09:23:01 +08:00
|
|
|
@@ -216,9 +216,9 @@ target_link_libraries(${PROJECT_NAME} ${_INTERFACE_OR_PUBLIC}
|
2023-04-11 05:28:24 +08:00
|
|
|
# Needed for API from MacOS Security framework
|
2023-05-09 09:23:01 +08:00
|
|
|
"$<$<AND:$<PLATFORM_ID:Darwin>,$<BOOL:${HTTPLIB_IS_USING_OPENSSL}>,$<BOOL:${HTTPLIB_USE_CERTS_FROM_MACOSX_KEYCHAIN}>>:-framework CoreFoundation -framework Security>"
|
2022-12-20 07:00:59 +08:00
|
|
|
# Can't put multiple targets in a single generator expression or it bugs out.
|
|
|
|
- $<$<BOOL:${HTTPLIB_IS_USING_BROTLI}>:Brotli::common>
|
|
|
|
- $<$<BOOL:${HTTPLIB_IS_USING_BROTLI}>:Brotli::encoder>
|
|
|
|
- $<$<BOOL:${HTTPLIB_IS_USING_BROTLI}>:Brotli::decoder>
|
|
|
|
+ $<$<BOOL:${HTTPLIB_IS_USING_BROTLI}>:unofficial::brotli::brotlicommon>
|
|
|
|
+ $<$<BOOL:${HTTPLIB_IS_USING_BROTLI}>:unofficial::brotli::brotlienc>
|
|
|
|
+ $<$<BOOL:${HTTPLIB_IS_USING_BROTLI}>:unofficial::brotli::brotlidec>
|
|
|
|
$<$<BOOL:${HTTPLIB_IS_USING_ZLIB}>:ZLIB::ZLIB>
|
|
|
|
$<$<BOOL:${HTTPLIB_IS_USING_OPENSSL}>:OpenSSL::SSL>
|
|
|
|
$<$<BOOL:${HTTPLIB_IS_USING_OPENSSL}>:OpenSSL::Crypto>
|
2023-05-09 09:23:01 +08:00
|
|
|
@@ -274,9 +274,6 @@ install(FILES "${_httplib_build_includedir}/httplib.h" TYPE INCLUDE)
|
2022-12-20 07:00:59 +08:00
|
|
|
install(FILES
|
|
|
|
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
|
|
|
|
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
|
|
|
|
- # Install it so it can be used later by the httplibConfig.cmake file.
|
|
|
|
- # Put it in the same dir as our config file instead of a global path so we don't potentially stomp on other packages.
|
|
|
|
- "${CMAKE_CURRENT_SOURCE_DIR}/cmake/FindBrotli.cmake"
|
|
|
|
DESTINATION ${_TARGET_INSTALL_CMAKEDIR}
|
|
|
|
)
|
|
|
|
|