mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2025-05-11 21:53:57 +00:00
cmake: fix find_dependency (#1509)
This commit is contained in:
parent
016838fd10
commit
bab5c0e907
@ -12,19 +12,19 @@ set(HTTPLIB_VERSION @PROJECT_VERSION@)
|
|||||||
include(CMakeFindDependencyMacro)
|
include(CMakeFindDependencyMacro)
|
||||||
|
|
||||||
# We add find_dependency calls here to not make the end-user have to call them.
|
# We add find_dependency calls here to not make the end-user have to call them.
|
||||||
find_dependency(Threads REQUIRED)
|
find_dependency(Threads)
|
||||||
if(@HTTPLIB_IS_USING_OPENSSL@)
|
if(@HTTPLIB_IS_USING_OPENSSL@)
|
||||||
# OpenSSL COMPONENTS were added in Cmake v3.11
|
# OpenSSL COMPONENTS were added in Cmake v3.11
|
||||||
if(CMAKE_VERSION VERSION_LESS "3.11")
|
if(CMAKE_VERSION VERSION_LESS "3.11")
|
||||||
find_dependency(OpenSSL @_HTTPLIB_OPENSSL_MIN_VER@ REQUIRED)
|
find_dependency(OpenSSL @_HTTPLIB_OPENSSL_MIN_VER@)
|
||||||
else()
|
else()
|
||||||
# Once the COMPONENTS were added, they were made optional when not specified.
|
# Once the COMPONENTS were added, they were made optional when not specified.
|
||||||
# Since we use both, we need to search for both.
|
# Since we use both, we need to search for both.
|
||||||
find_dependency(OpenSSL @_HTTPLIB_OPENSSL_MIN_VER@ COMPONENTS Crypto SSL REQUIRED)
|
find_dependency(OpenSSL @_HTTPLIB_OPENSSL_MIN_VER@ COMPONENTS Crypto SSL)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
if(@HTTPLIB_IS_USING_ZLIB@)
|
if(@HTTPLIB_IS_USING_ZLIB@)
|
||||||
find_dependency(ZLIB REQUIRED)
|
find_dependency(ZLIB)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(@HTTPLIB_IS_USING_BROTLI@)
|
if(@HTTPLIB_IS_USING_BROTLI@)
|
||||||
@ -32,7 +32,7 @@ if(@HTTPLIB_IS_USING_BROTLI@)
|
|||||||
# Note that the FindBrotli.cmake file is installed in the same dir as this file.
|
# Note that the FindBrotli.cmake file is installed in the same dir as this file.
|
||||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}")
|
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}")
|
||||||
set(BROTLI_USE_STATIC_LIBS @BROTLI_USE_STATIC_LIBS@)
|
set(BROTLI_USE_STATIC_LIBS @BROTLI_USE_STATIC_LIBS@)
|
||||||
find_dependency(Brotli COMPONENTS common encoder decoder REQUIRED)
|
find_dependency(Brotli COMPONENTS common encoder decoder)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Mildly useful for end-users
|
# Mildly useful for end-users
|
||||||
|
Loading…
x
Reference in New Issue
Block a user