[curl]Fix tools depends zlib. (#8739)

This commit is contained in:
JackBoosY 2019-10-26 05:28:11 +08:00 committed by Robert Schumacher
parent 3b868ac769
commit d3a7830335
3 changed files with 24 additions and 1 deletions

View File

@ -0,0 +1,22 @@
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 63e2b94..b376cd1 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -40,6 +40,8 @@ if(MSVC)
list(APPEND CURL_FILES curl.rc)
endif()
+find_package(ZLIB REQUIRED)
+
# CURL_FILES comes from Makefile.inc
add_executable(
${EXE_NAME}
@@ -59,7 +61,7 @@ include_directories(
)
#Build curl executable
-target_link_libraries(${EXE_NAME} libcurl ${CURL_LIBS})
+target_link_libraries(${EXE_NAME} libcurl ${CURL_LIBS} ZLIB::ZLIB)
################################################################################

View File

@ -1,5 +1,5 @@
Source: curl Source: curl
Version: 7.66.0 Version: 7.66.0-1
Build-Depends: zlib Build-Depends: zlib
Homepage: https://github.com/curl/curl Homepage: https://github.com/curl/curl
Description: A library for transferring data with URLs Description: A library for transferring data with URLs

View File

@ -12,6 +12,7 @@ vcpkg_from_github(
0003_fix_libraries.patch 0003_fix_libraries.patch
0004_nghttp2_staticlib.patch 0004_nghttp2_staticlib.patch
0005_remove_imp_suffix.patch 0005_remove_imp_suffix.patch
0006_fix_tool_depends.patch
) )
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" CURL_STATICLIB) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" CURL_STATICLIB)