Added missing file

This commit is contained in:
Davis King 2015-09-27 20:27:51 -04:00
parent 588ac7737c
commit a80aaf1841
1 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,19 @@
# Including this cmake script into your cmake project will cause visual studio
# to build your project against the static C runtime.
cmake_minimum_required(VERSION 2.6.4)
if (POLICY CMP0054)
cmake_policy(SET CMP0054 NEW)
endif()
if (MSVC OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
foreach(flag_var
CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO)
if(${flag_var} MATCHES "/MD")
string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
endif()
endforeach(flag_var)
endif()