Skip to content

Commit ce6be40

Browse files
committed
MDEV-37997 vcpkg's FIND_PACKAGE throws error for zlib dependent packages
Build with vcpkg and WITH_ZLIB=bundled throws error "Broken installation of vcpkg port zlib" in FIND_PACKAGE(CURL) Set CMAKE_DISABLE_FIND_PACKAGE_ZLIB to workaround. Previously, this workaround was hashicorp specific, now we need this also for videx. Thus setting CMAKE_DISABLE_FIND_PACKAGE_ZLIB was moved to correct place, inside MYSQL_USE_BUNDLED_ZLIB macro.
1 parent 1e07daa commit ce6be40

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

cmake/zlib.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ MACRO (MYSQL_USE_BUNDLED_ZLIB)
2121
SET(ZLIB_LIBRARY ${ZLIB_LIBRARIES})
2222
SET(ZLIB_INCLUDE_DIR ${ZLIB_INCLUDE_DIRS})
2323
SET(ZLIB_FOUND TRUE)
24+
IF(VCPKG_INSTALLED_DIR)
25+
# Avoid errors in vcpkg's FIND_PACKAGE
26+
# for packages dependend on zlib
27+
SET(CMAKE_DISABLE_FIND_PACKAGE_ZLIB 1)
28+
ENDIF()
2429
SET(WITH_ZLIB "bundled" CACHE STRING "Use bundled zlib")
2530
ADD_SUBDIRECTORY(zlib)
2631
ENDMACRO()

plugin/hashicorp_key_management/CMakeLists.txt

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

0 commit comments

Comments
 (0)