Commit 3ab21fd4 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

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.
parent 93efbc39
...@@ -107,6 +107,16 @@ IF(MSVC) ...@@ -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 ") MESSAGE(FATAL_ERROR "Invalid value ${MSVC_CRT_TYPE} for MSVC_CRT_TYPE, choose one of /MT,/MTd,/MD,/MDd ")
ENDIF() 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) 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") SET(DYNAMIC_UCRT_LINKER_OPTION " /NODEFAULTLIB:libucrt.lib /DEFAULTLIB:ucrt.lib")
......
...@@ -9,7 +9,7 @@ IF(ESSENTIALS) ...@@ -9,7 +9,7 @@ IF(ESSENTIALS)
ENDIF() ENDIF()
ELSE() ELSE()
SET(CPACK_COMPONENTS_USED 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() ENDIF()
SET( WIX_FEATURE_MySQLServer_EXTRA_FEATURES "DBInstance;SharedClientServerComponents") SET( WIX_FEATURE_MySQLServer_EXTRA_FEATURES "DBInstance;SharedClientServerComponents")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment