Commit 423c7ef856661b774dde28dc737fff84ec7c88d5

Sam Lantinga 2022-05-27T14:47:39

Don't set SDL2_LIBRARY, we need the Framework configuration on Apple platforms

diff --git a/Xcode/SDL/pkg-support/resources/CMake/sdl2-config.cmake b/Xcode/SDL/pkg-support/resources/CMake/sdl2-config.cmake
index 3db895f..aa61856 100644
--- a/Xcode/SDL/pkg-support/resources/CMake/sdl2-config.cmake
+++ b/Xcode/SDL/pkg-support/resources/CMake/sdl2-config.cmake
@@ -30,9 +30,6 @@ endif()
 
 set(SDL2_FOUND TRUE)
 
-set(SDL2_INCLUDE_DIR    "${CMAKE_CURRENT_LIST_DIR}/../../Headers")
-set(SDL2_INCLUDE_DIRS   "${SDL2_INCLUDE_DIR}")
-set(SDL2_LIBRARY        "${CMAKE_CURRENT_LIST_DIR}/../../SDL2")
 string(REGEX REPLACE "SDL2\\.framework.*" "SDL2.framework" SDL2_FRAMEWORK_PATH "${CMAKE_CURRENT_LIST_DIR}")
 string(REGEX REPLACE "SDL2\\.framework.*" "" SDL2_FRAMEWORK_PARENT_PATH "${CMAKE_CURRENT_LIST_DIR}")
 
@@ -44,7 +41,7 @@ if(NOT TARGET SDL2::SDL2)
     set_target_properties(SDL2::SDL2
         PROPERTIES
             INTERFACE_COMPILE_OPTIONS "-F;${SDL2_FRAMEWORK_PARENT_PATH}"
-            INTERFACE_INCLUDE_DIRECTORIES "${SDL2_FRAMEWORK_PARENT_PATH}/SDL2.framework/Headers"
+            INTERFACE_INCLUDE_DIRECTORIES "${SDL2_FRAMEWORK_PATH}/Headers"
             INTERFACE_LINK_OPTIONS "-F;${SDL2_FRAMEWORK_PARENT_PATH};-framework;SDL2"
     )
 endif()