mirror of
https://github.com/ZDoom/acc.git
synced 2024-11-15 00:41:30 +00:00
- forced static MSVC runtime
This commit is contained in:
parent
d60c4901f4
commit
8a7d09c031
1 changed files with 14 additions and 0 deletions
|
@ -2,6 +2,20 @@ cmake_minimum_required(VERSION 2.4)
|
|||
|
||||
project(acc)
|
||||
|
||||
if(MSVC)
|
||||
# Create list of _FLAGS variables
|
||||
foreach(FLAGS_SUFFIX "" _DEBUG _RELEASE _MINSIZEREL _RELWITHDEBINFO)
|
||||
set(FLAGS_VARIABLES ${FLAGS_VARIABLES} CMAKE_C_FLAGS${FLAGS_SUFFIX} CMAKE_CXX_FLAGS${FLAGS_SUFFIX})
|
||||
endforeach()
|
||||
|
||||
# Change compiler flags to use static runtime
|
||||
foreach(FLAGS_VARIABLE ${FLAGS_VARIABLES})
|
||||
if(${FLAGS_VARIABLE} MATCHES "/MD")
|
||||
string(REGEX REPLACE "/MD" "/MT" ${FLAGS_VARIABLE} "${${FLAGS_VARIABLE}}")
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
add_executable(acc
|
||||
acc.c
|
||||
error.c
|
||||
|
|
Loading…
Reference in a new issue