Explorar o código

cmake: SDL2 target is not always available

Anonymous Maarten hai 1 ano
pai
achega
7cf3234efe
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      CMakeLists.txt

+ 4 - 1
CMakeLists.txt

@@ -3548,7 +3548,10 @@ if(SDL_TEST)
 endif()
 
 if(MSVC AND NOT SDL_LIBC)
-  set(targets SDL2)
+  set(targets )
+  if(TARGET SDL2)
+    list(APPEND targets SDL2)
+  endif()
   if(TARGET SDL2-static)
     list(APPEND targets SDL2-static)
   endif()