File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 1- # Copyright (c) 2010, 2016 , Oracle and/or its affiliates. All rights reserved.
1+ # Copyright (c) 2010, 2017 , Oracle and/or its affiliates. All rights reserved.
22#
33# This program is free software; you can redistribute it and/or modify
44# it under the terms of the GNU General Public License as published by
@@ -65,6 +65,7 @@ IF(MINGW AND CMAKE_SIZEOF_VOID_P EQUAL 4)
6565ENDIF ()
6666
6767IF (MSVC )
68+ OPTION (LINK_STATIC_RUNTIME_LIBRARIES "Link with /MT" OFF )
6869 # Enable debug info also in Release build,
6970 # and create PDB to be able to analyze crashes.
7071 FOREACH (type EXE SHARED MODULE)
@@ -94,7 +95,9 @@ IF(MSVC)
9495 CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_DEBUG_INIT
9596 CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_RELWITHDEBINFO
9697 CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_DEBUG_INIT)
97- STRING (REPLACE "/MD" "/MT" "${flag} " "${${flag} }" )
98+ IF (LINK_STATIC_RUNTIME_LIBRARIES)
99+ STRING (REPLACE "/MD" "/MT" "${flag} " "${${flag} }" )
100+ ENDIF ()
98101 STRING (REPLACE "/Zi" "/Z7" "${flag} " "${${flag} }" )
99102 SET ("${flag} " "${${flag} } /EHsc" )
100103 ENDFOREACH ()
You can’t perform that action at this time.
0 commit comments