summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2020-04-10 18:59:55 +0200
committerVladislav Vaintroub <wlad@mariadb.com>2020-04-10 19:05:26 +0200
commit3ab21fd4e08228a930a4fa8a6e469a5c1def4d9f (patch)
treefe99ed28808e87aeda9398130858ae052bbd31a9
parent93efbc390d13cb84fec4fad76a2c8b4d9e965fe8 (diff)
downloadmariadb-git-bb-10.5-server-dll.tar.gz
Windows build - use InstallRequiredSystemLibraries for MSVC_CRT_TYPE=/MDbb-10.5-server-dll
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.
-rw-r--r--cmake/os/Windows.cmake10
-rw-r--r--win/packaging/CPackWixConfig.cmake2
2 files changed, 11 insertions, 1 deletions
diff --git a/cmake/os/Windows.cmake b/cmake/os/Windows.cmake
index d5f14c6476b..d3cb49bdf3b 100644
--- a/cmake/os/Windows.cmake
+++ b/cmake/os/Windows.cmake
@@ -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")
diff --git a/win/packaging/CPackWixConfig.cmake b/win/packaging/CPackWixConfig.cmake
index 74329e79247..4ac4d38471e 100644
--- a/win/packaging/CPackWixConfig.cmake
+++ b/win/packaging/CPackWixConfig.cmake
@@ -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")