MDEV-33474 Windows packaging - install runtime dependencies

Use CMake 3.21 (semi)automatic dependency resolution to install server
and plugin dependencies (DLLs).

This is especially useful with 3rd party dependencies, such as Curl, zlib
etc
This commit is contained in:
Vladislav Vaintroub
2025-04-14 16:50:16 +02:00
parent 2dc9b8b78e
commit 11324875b4
5 changed files with 46 additions and 8 deletions

View File

@ -125,6 +125,18 @@ ENDIF()
FIND_PACKAGE(Git)
IF(WIN32 AND (CMAKE_VERSION VERSION_GREATER "3.21"))
# Install runtime dependency by default, when using vcpkg
IF(NOT DEFINED INSTALL_RUNTIME_DEPENDENCIES_DEFAULT)
IF("${VCPKG_INSTALLED_DIR}")
SET(INSTALL_RUNTIME_DEPENDENCIES_DEFAULT OFF)
ELSE()
SET(INSTALL_RUNTIME_DEPENDENCIES_DEFAULT ON)
ENDIF()
ENDIF()
OPTION(INSTALL_RUNTIME_DEPENDENCIES "Install runtime dependencies" "${INSTALL_RUNTIME_DEPENDENCIES_DEFAULT}")
ENDIF()
# Following autotools tradition, add preprocessor definitions
# specified in environment variable CPPFLAGS
IF(DEFINED ENV{CPPFLAGS})