Skip to content

Commit 6fea571

Browse files
committed
MDEV-3799 Windows WITH_ZLIB=bundled build errors with hashicorp_key_management
We compile curl with vcpkg. vcpkg prefers dependencies of the vcpkg package to come from vcpkg as well. We break its logic by setting and ZLIB_LIBRARY in cmake/zlib.cmake to the static library that we compile outselves. This vcpkg check is not critical or needed when shared libraries are used. As a workaround, set CMAKE_DISABLE_FIND_PACKAGE_ZLIB when compiling hashicorp_key_management, in this case vcpkg skips the zlib check.
1 parent 66aa250 commit 6fea571

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

plugin/hashicorp_key_management/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
IF(VCPKG_INSTALLED_DIR AND (WITH_ZLIB STREQUAL "bundled"))
2+
SET(CMAKE_DISABLE_FIND_PACKAGE_ZLIB 1)
3+
ENDIF()
14
FIND_PACKAGE(CURL)
25
IF(NOT CURL_FOUND)
36
# Can't build plugin

0 commit comments

Comments
 (0)