From e6c4db816085d2cb84e7d44562a3cd10cabe62a5 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Tue, 15 Nov 2022 19:22:42 +0100 Subject: [PATCH] The SDL2::SDL2 target in SDL2.framework needs to see the SDL2 include folder SDL.h includes other files through SDL2/SDL_xxx.h --- Xcode/SDL/pkg-support/resources/CMake/sdl2-config.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Xcode/SDL/pkg-support/resources/CMake/sdl2-config.cmake b/Xcode/SDL/pkg-support/resources/CMake/sdl2-config.cmake index e4294d90f..28c34bc70 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"