Browse Source

cmake: only MSVC understands -nodefaultlib:MSVCRT

Anonymous Maarten 2 years ago
parent
commit
3acd1ad25f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      CMakeLists.txt

+ 1 - 1
CMakeLists.txt

@@ -3246,7 +3246,7 @@ if(SDL_SHARED)
   add_library(SDL3::SDL3 ALIAS SDL3)
   set_target_properties(SDL3 PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
   if(NOT SDL_LIBC)
-    if(SDL_CPU_X86)
+    if(MSVC AND SDL_CPU_X86)
       # FIXME: should be added for all architectures (missing symbols for ARM)
       target_link_libraries(SDL3 PRIVATE "-nodefaultlib:MSVCRT")
     endif()