aboutsummaryrefslogtreecommitdiff
path: root/CMake
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 /CMake
parent537763f7f517a8612dc1f7499be95a4eed89ebbd (diff)
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 'CMake')
-rw-r--r--CMake/curl-config.cmake.in (renamed from CMake/curl-config.cmake)5
1 files changed, 5 insertions, 0 deletions
diff --git a/CMake/curl-config.cmake b/CMake/curl-config.cmake.in
index 10045c6b7..73e04c606 100644
--- a/CMake/curl-config.cmake
+++ b/CMake/curl-config.cmake.in
@@ -9,6 +9,11 @@ if(NOT CURL_FIND_COMPONENTS)
endif()
endif()
+include(CMakeFindDependencyMacro)
+if(CURL_FIND_REQUIRED_libcurl)
+ find_dependency(OpenSSL "@OPENSSL_VERSION_MAJOR@")
+endif()
+
set(_curl_missing_components)
foreach(_comp ${CURL_FIND_COMPONENTS})
if(EXISTS "${_DIR}/${_comp}-target.cmake")