summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJohn Butterfield <johnb003@gmail.com>2018-07-17 01:13:18 -0700
committerDaniel Stenberg <daniel@haxx.se>2018-08-08 09:35:27 +0200
commit7867aaa9a01decf93711428462335be8cef70212 (patch)
treed3b5b5def01388f50c8c3263da1f07f83341114d /CMakeLists.txt
parent537763f7f517a8612dc1f7499be95a4eed89ebbd (diff)
downloadcurl-7867aaa9a01decf93711428462335be8cef70212.tar.gz
cmake: link curl to the OpenSSL targets instead of lib absolute paths
Reviewed-by: Jakub Zakrzewski Reviewed-by: Sergei Nikulov Closes #2753
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt8
1 files changed, 4 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cafe983f4..fa2fc094e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -352,8 +352,8 @@ if(CMAKE_USE_OPENSSL)
set(USE_OPENSSL ON)
set(HAVE_LIBCRYPTO ON)
set(HAVE_LIBSSL ON)
- list(APPEND CURL_LIBS ${OPENSSL_LIBRARIES})
- include_directories(${OPENSSL_INCLUDE_DIR})
+ list(APPEND CURL_LIBS OpenSSL::SSL OpenSSL::Crypto)
+
set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
check_include_file("openssl/crypto.h" HAVE_OPENSSL_CRYPTO_H)
check_include_file("openssl/err.h" HAVE_OPENSSL_ERR_H)
@@ -1308,9 +1308,9 @@ write_basic_package_version_file(
COMPATIBILITY SameMajorVersion
)
-configure_file(CMake/curl-config.cmake
+configure_file(CMake/curl-config.cmake.in
"${PROJECT_BINARY_DIR}/curl-config.cmake"
- COPYONLY
+ @ONLY
)
install(