The SDL2::SDL2 target in SDL2.framework needs to see the SDL2 include folder

SDL.h includes other files through SDL2/SDL_xxx.h
This commit is contained in:
Anonymous Maarten 2022-11-15 19:22:42 +01:00
parent 70656b133c
commit e6c4db8160
1 changed files with 2 additions and 2 deletions

View File

@ -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_PREFIX "${SDL2_FRAMEWORK_PATH}")
set_and_check(SDL2_EXEC_PREFIX "${SDL2_FRAMEWORK_PATH}") set_and_check(SDL2_EXEC_PREFIX "${SDL2_FRAMEWORK_PATH}")
set_and_check(SDL2_INCLUDE_DIR "${SDL2_FRAMEWORK_PATH}/Headers") 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_BINDIR "${SDL2_FRAMEWORK_PATH}")
set_and_check(SDL2_LIBDIR "${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 set_target_properties(SDL2::SDL2
PROPERTIES PROPERTIES
INTERFACE_COMPILE_OPTIONS "SHELL:-F \"${SDL2_FRAMEWORK_PARENT_PATH}\"" 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" INTERFACE_LINK_OPTIONS "SHELL:-F \"${SDL2_FRAMEWORK_PARENT_PATH}\";SHELL:-framework SDL2"
COMPATIBLE_INTERFACE_BOOL "SDL2_SHARED" COMPATIBLE_INTERFACE_BOOL "SDL2_SHARED"
INTERFACE_SDL2_SHARED "ON" INTERFACE_SDL2_SHARED "ON"