mirror of
https://github.com/SFML/SFML.git
synced 2024-11-25 04:41:05 +08:00
Fix SFML_USE_STATIC_STD_LIBS behaviour with newer cmake. As the flags aren't always included in the defaults instead of replacing we must strip existing (if present) then add the correct flag
This commit is contained in:
parent
0a6d44fff1
commit
c7f6ad6127
@ -219,10 +219,9 @@ if(SFML_OS_WINDOWS)
|
||||
foreach(flag
|
||||
CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
|
||||
CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO)
|
||||
if(${flag} MATCHES "/MD")
|
||||
string(REGEX REPLACE "/MD" "/MT" ${flag} "${${flag}}")
|
||||
endif()
|
||||
string(REGEX REPLACE "/MD|/MDd|/MT|/MTd" "" ${flag} "${${flag}}")
|
||||
endforeach()
|
||||
add_compile_options(/MT$<$<CONFIG:Debug>:d>)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user