Allow to specify C runtime library used for compilation.

Default to static release (previously static debug was used in debug
builds, but not is appears to be too slow)
This commit is contained in:
Vladislav Vaintroub 2017-03-30 13:11:34 +00:00
commit 0cca5bdf0b
3 changed files with 30 additions and 13 deletions

View file

@ -9,7 +9,7 @@ IF(ESSENTIALS)
ENDIF()
ELSE()
SET(CPACK_COMPONENTS_USED
"Server;Client;Development;SharedLibraries;Documentation;Readme;Debuginfo;Common;connect-engine;ClientPlugins;gssapi-server;gssapi-client;aws-key-management;rocksdb-engine")
"Server;Client;Development;SharedLibraries;Documentation;Readme;Debuginfo;Common;VCCRT;connect-engine;ClientPlugins;gssapi-server;gssapi-client;aws-key-management;rocksdb-engine")
ENDIF()
SET( WIX_FEATURE_MySQLServer_EXTRA_FEATURES "DBInstance;SharedClientServerComponents")
@ -35,6 +35,7 @@ SET(CPACK_COMPONENTS_ALL ${CPACK_ALL})
SET(CPACK_COMPONENT_GROUP_ALWAYSINSTALL_HIDDEN 1)
SET(CPACK_COMPONENT_README_GROUP "AlwaysInstall")
SET(CPACK_COMPONENT_COMMON_GROUP "AlwaysInstall")
SET(CPACK_COMPONENT_VCCRT_GROUP "AlwaysInstall")
# Feature MySQL Server
SET(CPACK_COMPONENT_GROUP_MYSQLSERVER_DISPLAY_NAME "MariaDB Server")

View file

@ -16,10 +16,13 @@ IF(NOT MFC_FOUND)
ENDIF()
RETURN()
ENDIF()
# MFC should be statically linked
SET(CMAKE_MFC_FLAG 1)
IF(MSVC_CRT_TYPE MATCHES "/MD")
# MFC should be dynamically linked
SET(CMAKE_MFC_FLAG 2)
ELSE()
# MFC should be statically linked
SET(CMAKE_MFC_FLAG 1)
ENDIF()
# Enable exception handling (avoids warnings)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc")