Commit 19150f7e authored by Tor Didriksen's avatar Tor Didriksen

Bug#25611609 LINK WITH DYNAMIC RUNTIME LIBRARIES ON WINDOWS

Patch for 5.5 and 5.6
Use default runtime libraries on windows, i.e. build with /MD
parent 18b3aa11
# Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
......@@ -64,6 +64,7 @@ IF(MINGW AND CMAKE_SIZEOF_VOID_P EQUAL 4)
ENDIF()
IF(MSVC)
OPTION(LINK_STATIC_RUNTIME_LIBRARIES "Link with /MT" OFF)
# Enable debug info also in Release build,
# and create PDB to be able to analyze crashes.
FOREACH(type EXE SHARED MODULE)
......@@ -86,7 +87,9 @@ IF(MSVC)
CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_DEBUG_INIT
CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_RELWITHDEBINFO
CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_DEBUG_INIT)
IF(LINK_STATIC_RUNTIME_LIBRARIES)
STRING(REPLACE "/MD" "/MT" "${flag}" "${${flag}}")
ENDIF()
STRING(REPLACE "/Zi" "/Z7" "${flag}" "${${flag}}")
ENDFOREACH()
......
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