mirror of
https://github.com/MariaDB/server.git
synced 2026-10-23 18:49:29 +03:00
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.
This commit is contained in:
@@ -21,6 +21,11 @@ MACRO (MYSQL_USE_BUNDLED_ZLIB)
|
||||
SET(ZLIB_LIBRARY ${ZLIB_LIBRARIES})
|
||||
SET(ZLIB_INCLUDE_DIR ${ZLIB_INCLUDE_DIRS})
|
||||
SET(ZLIB_FOUND TRUE)
|
||||
IF(VCPKG_INSTALLED_DIR)
|
||||
# Avoid errors in vcpkg's FIND_PACKAGE
|
||||
# for packages dependend on zlib
|
||||
SET(CMAKE_DISABLE_FIND_PACKAGE_ZLIB 1)
|
||||
ENDIF()
|
||||
SET(WITH_ZLIB "bundled" CACHE STRING "Use bundled zlib")
|
||||
ADD_SUBDIRECTORY(zlib)
|
||||
ENDMACRO()
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
IF(VCPKG_INSTALLED_DIR AND (WITH_ZLIB STREQUAL "bundled"))
|
||||
SET(CMAKE_DISABLE_FIND_PACKAGE_ZLIB 1)
|
||||
ENDIF()
|
||||
FIND_PACKAGE(CURL)
|
||||
IF(NOT CURL_FOUND)
|
||||
# Can't build plugin
|
||||
|
||||
Reference in New Issue
Block a user