From eba4deb99ee72db32fcac4238d87e394a3ea2b7a Mon Sep 17 00:00:00 2001 From: Alex Szpakowski Date: Sat, 22 Aug 2015 22:59:24 -0300 Subject: [PATCH] Fixed linker errors when compiling debug builds of SDL2. --- libs/SDL2/CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) mode change 100644 => 100755 libs/SDL2/CMakeLists.txt diff --git a/libs/SDL2/CMakeLists.txt b/libs/SDL2/CMakeLists.txt old mode 100644 new mode 100755 index 86641c61..825f271c --- a/libs/SDL2/CMakeLists.txt +++ b/libs/SDL2/CMakeLists.txt @@ -169,6 +169,13 @@ if(MSVC) endif() endforeach() endif() + + # Make sure /RTC1 is disabled, otherwise it will use functions from the CRT + foreach(flag_var + CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE + CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO) + string(REGEX REPLACE "/RTC(su|[1su])" "" ${flag_var} "${${flag_var}}") + endforeach(flag_var) endif() # Those are used for pkg-config and friends, so that the SDL2.pc, sdl2-config,