From 5b1d1466c1b8a6cb49aac8db7e04a97428c1dfa8 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" <[EMAIL REDACTED]>
Date: Tue, 29 Nov 2022 21:55:55 -0500
Subject: [PATCH] cmake: Maybe fix Visual Studio builds.
---
CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 56e5e44..80a2133 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -229,7 +229,7 @@ if(MSVC)
if(SDL_CPU_X86) # don't emit SSE2 in x86 builds
target_compile_options(SDL2 PRIVATE /arch:SSE)
endif()
- target_link_libraries(SDL2 PRIVATE /NODEFAULTLIB)
+ set_target_properties(SDL2 PROPERTIES LINK_FLAGS "/NODEFAULTLIB")
# Make sure /RTC1 is disabled: (from SDL2 CMake)
foreach(flag_var
CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE