From 423c7ef856661b774dde28dc737fff84ec7c88d5 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Fri, 27 May 2022 14:47:39 -0700 Subject: [PATCH] Don't set SDL2_LIBRARY, we need the Framework configuration on Apple platforms --- Xcode/SDL/pkg-support/resources/CMake/sdl2-config.cmake | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Xcode/SDL/pkg-support/resources/CMake/sdl2-config.cmake b/Xcode/SDL/pkg-support/resources/CMake/sdl2-config.cmake index 3db895fcd..aa6185690 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()