Commit e6c4db816085d2cb84e7d44562a3cd10cabe62a5

Anonymous Maarten 2022-11-15T19:22:42

The SDL2::SDL2 target in SDL2.framework needs to see the SDL2 include folder SDL.h includes other files through SDL2/SDL_xxx.h

diff --git a/Xcode/SDL/pkg-support/resources/CMake/sdl2-config.cmake b/Xcode/SDL/pkg-support/resources/CMake/sdl2-config.cmake
index e4294d9..28c34bc 100644
--- a/Xcode/SDL/pkg-support/resources/CMake/sdl2-config.cmake
+++ b/Xcode/SDL/pkg-support/resources/CMake/sdl2-config.cmake
@@ -39,7 +39,7 @@ string(REGEX REPLACE "SDL2\\.framework.*" "" SDL2_FRAMEWORK_PARENT_PATH "${CMAKE
 set_and_check(SDL2_PREFIX       "${SDL2_FRAMEWORK_PATH}")
 set_and_check(SDL2_EXEC_PREFIX  "${SDL2_FRAMEWORK_PATH}")
 set_and_check(SDL2_INCLUDE_DIR  "${SDL2_FRAMEWORK_PATH}/Headers")
-set(SDL2_INCLUDE_DIRS           "${SDL2_INCLUDE_DIR}")
+set(SDL2_INCLUDE_DIRS           "${SDL2_INCLUDE_DIR};${SDL2_FRAMEWORK_PATH}")
 set_and_check(SDL2_BINDIR       "${SDL2_FRAMEWORK_PATH}")
 set_and_check(SDL2_LIBDIR       "${SDL2_FRAMEWORK_PATH}")
 
@@ -53,7 +53,7 @@ if(NOT TARGET SDL2::SDL2)
     set_target_properties(SDL2::SDL2
         PROPERTIES
             INTERFACE_COMPILE_OPTIONS "SHELL:-F \"${SDL2_FRAMEWORK_PARENT_PATH}\""
-            INTERFACE_INCLUDE_DIRECTORIES "${SDL2_INCLUDE_DIR}"
+            INTERFACE_INCLUDE_DIRECTORIES "${SDL2_INCLUDE_DIRS}"
             INTERFACE_LINK_OPTIONS "SHELL:-F \"${SDL2_FRAMEWORK_PARENT_PATH}\";SHELL:-framework SDL2"
             COMPATIBLE_INTERFACE_BOOL "SDL2_SHARED"
             INTERFACE_SDL2_SHARED "ON"