]> granicus.if.org Git - curl/commitdiff
cmake: add find_dependency call for ZLIB to CMake config file
authorTuomo Rinne <me@tuomo.co.uk>
Thu, 11 Oct 2018 18:55:53 +0000 (19:55 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 29 Oct 2018 16:10:27 +0000 (17:10 +0100)
CMake/curl-config.cmake.in

index 2cae644c06caec0246d60455839784fbf66e703b..5f296343e1e0d62bd9ce175a254cc55d6ef06b92 100644 (file)
@@ -1,9 +1,15 @@
 @PACKAGE_INIT@
 
-if("@USE_OPENSSL@")
+if("@USE_OPENSSL@" OR "@CURL_ZLIB@" )
     include(CMakeFindDependencyMacro)
-    find_dependency(OpenSSL "@OPENSSL_VERSION_MAJOR@")
+    if ("@USE_OPENSSL@")
+        find_dependency(OpenSSL "@OPENSSL_VERSION_MAJOR@")
+    endif()
+    if("@CURL_ZLIB@")
+       find_dependency(ZLIB "@ZLIB_VERSION_MAJOR@")
+    endif()
 endif()
 
+
 include("${CMAKE_CURRENT_LIST_DIR}/@TARGETS_EXPORT_NAME@.cmake")
 check_required_components("@PROJECT_NAME@")