mirror of https://github.com/libsdl-org/SDL
cmake: add `-F <SDL3-framework-parent-folder>` compile option in CMakeLists.txt
This commit is contained in:
parent
d0b39890d2
commit
236d26b480
|
@ -3159,7 +3159,12 @@ target_include_directories(SDL3_Headers
|
|||
if(SDL_FRAMEWORK)
|
||||
target_include_directories(SDL3_Headers
|
||||
INTERFACE
|
||||
"$<INSTALL_INTERFACE:SDL3.framework/Headers>"
|
||||
"$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/SDL3.framework/Headers>"
|
||||
)
|
||||
# Add `-F <parent folder of SDL3.framework>` to make sure `#include "SDL3/..."` works.
|
||||
target_compile_options(SDL3_Headers
|
||||
INTERFACE
|
||||
"$<INSTALL_INTERFACE:SHELL:-F $<INSTALL_PREFIX>>"
|
||||
)
|
||||
else()
|
||||
target_include_directories(SDL3_Headers
|
||||
|
|
|
@ -14,10 +14,6 @@ set(_sdl3_framework @SDL_FRAMEWORK@)
|
|||
# Find SDL3::Headers
|
||||
if(NOT TARGET SDL3::Headers)
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/SDL3headersTargets.cmake")
|
||||
# Manually add `-F <parent folder of SDL3.framework>` to make sure `#include "SDL3/..."` works.
|
||||
if(_sdl3_framework)
|
||||
set_property(TARGET SDL3::Headers APPEND PROPERTY INTERFACE_COMPILE_OPTIONS "SHELL:-F \"@PACKAGE_CMAKE_INSTALL_PREFIX@\"")
|
||||
endif()
|
||||
endif()
|
||||
set(SDL3_Headers_FOUND TRUE)
|
||||
|
||||
|
|
Loading…
Reference in New Issue