소스 검색

cmake: SDL2 target is not always available

Anonymous Maarten 1 년 전
부모
커밋
7cf3234efe
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  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()