Commit dc2ef31c29e7235369e0468bcbc9af15d7ff50b8

Anonymous Maarten 2022-08-24T04:12:58

cmake: create SDL2::SDL2main target in Apple framework official release

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git a/Xcode/SDL/pkg-support/resources/CMake/sdl2-config.cmake b/Xcode/SDL/pkg-support/resources/CMake/sdl2-config.cmake
index cc5cc4a..ca6bb3e 100644
--- a/Xcode/SDL/pkg-support/resources/CMake/sdl2-config.cmake
+++ b/Xcode/SDL/pkg-support/resources/CMake/sdl2-config.cmake
@@ -58,7 +58,10 @@ if(NOT TARGET SDL2::SDL2)
             COMPATIBLE_INTERFACE_BOOL "SDL2_SHARED"
             INTERFACE_SDL2_SHARED "ON"
     )
+    set(SDL2_SDL2_FOUND TRUE)
 endif()
-set(SDL2_SDL2_FOUND)
+
+add_library(SDL2::SDL2main INTERFACE IMPORTED)
+set(SDL2_SDL2main_FOUND TRUE)
 
 check_required_components(SDL2)