mirror of
https://github.com/MariaDB/server.git
synced 2025-12-28 08:10:14 +00:00
Windows build - use InstallRequiredSystemLibraries for MSVC_CRT_TYPE=/MD
CMake parameter This includes compiler-specific dependencies - tiny part of CRT, mostly memcpy/memset in msvcr140.dll - exception handling in msvc140_1.dll - C++ standard library in msvcp140 not much else CMake is smart enough to copy the dependencies into the bin directory itself.
This commit is contained in:
parent
93efbc390d
commit
3ab21fd4e0
@ -107,6 +107,16 @@ IF(MSVC)
|
||||
MESSAGE(FATAL_ERROR "Invalid value ${MSVC_CRT_TYPE} for MSVC_CRT_TYPE, choose one of /MT,/MTd,/MD,/MDd ")
|
||||
ENDIF()
|
||||
|
||||
IF(MSVC_CRT_TYPE MATCHES "/MD")
|
||||
# Dynamic runtime (DLLs), need to install CRT libraries.
|
||||
SET(CMAKE_INSTALL_SYSTEM_RUNTIME_COMPONENT VCCRT)
|
||||
SET(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS TRUE)
|
||||
IF(MSVC_CRT_TYPE STREQUAL "/MDd")
|
||||
SET (CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY TRUE)
|
||||
ENDIF()
|
||||
INCLUDE(InstallRequiredSystemLibraries)
|
||||
ENDIF()
|
||||
|
||||
OPTION(DYNAMIC_UCRT_LINK "Link Universal CRT dynamically, if MSVC_CRT_TYPE=/MT" ON)
|
||||
SET(DYNAMIC_UCRT_LINKER_OPTION " /NODEFAULTLIB:libucrt.lib /DEFAULTLIB:ucrt.lib")
|
||||
|
||||
|
||||
@ -9,7 +9,7 @@ IF(ESSENTIALS)
|
||||
ENDIF()
|
||||
ELSE()
|
||||
SET(CPACK_COMPONENTS_USED
|
||||
"Server;Client;Development;SharedLibraries;Documentation;Readme;Common;connect-engine;ClientPlugins;gssapi-server;gssapi-client;aws-key-management;rocksdb-engine;backup")
|
||||
"Server;Client;Development;SharedLibraries;Documentation;Readme;Common;connect-engine;ClientPlugins;gssapi-server;gssapi-client;aws-key-management;rocksdb-engine;backup;VCCRT")
|
||||
ENDIF()
|
||||
|
||||
SET( WIX_FEATURE_MySQLServer_EXTRA_FEATURES "DBInstance;SharedClientServerComponents")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user