CMake: Don't use /NODEFAULTLIB on Windows unless we're Visual Studio. release-2.0.2
authorRyan C. Gordon <icculus@icculus.org>
Fri, 07 Mar 2014 00:18:37 -0500
changeset 8297 be2102f000d0
parent 8296 cb13016bf07b
child 8298 28cfd3a2886f
CMake: Don't use /NODEFAULTLIB on Windows unless we're Visual Studio.
CMakeLists.txt
--- a/CMakeLists.txt	Thu Mar 06 20:02:17 2014 -0800
+++ b/CMakeLists.txt	Fri Mar 07 00:18:37 2014 -0500
@@ -1256,7 +1256,7 @@
   set (BUILD_SHARED_LIBS FALSE)
   add_library(SDL2-static STATIC ${SOURCE_FILES})
   set_target_properties(SDL2-static PROPERTIES OUTPUT_NAME "SDL2")
-  if(WINDOWS)
+  if(MSVC)
     set_target_properties(SDL2-static PROPERTIES LINK_FLAGS_RELEASE "/NODEFAULTLIB")
     set_target_properties(SDL2-static PROPERTIES LINK_FLAGS_DEBUG "/NODEFAULTLIB")
     set_target_properties(SDL2-static PROPERTIES STATIC_LIBRARY_FLAGS "/NODEFAULTLIB")