From 236d26b480f0475e93cbb1965c68dfb35df3c23b Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Mon, 13 Feb 2023 05:14:40 +0100 Subject: [PATCH] cmake: add `-F ` compile option in CMakeLists.txt --- CMakeLists.txt | 7 ++++++- cmake/SDL3Config.cmake.in | 4 ---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c4ae809da..b1c226b67 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3159,7 +3159,12 @@ target_include_directories(SDL3_Headers if(SDL_FRAMEWORK) target_include_directories(SDL3_Headers INTERFACE - "$" + "$/SDL3.framework/Headers>" + ) + # Add `-F ` to make sure `#include "SDL3/..."` works. + target_compile_options(SDL3_Headers + INTERFACE + "$>" ) else() target_include_directories(SDL3_Headers diff --git a/cmake/SDL3Config.cmake.in b/cmake/SDL3Config.cmake.in index 0bbdd2302..27ebd5a1d 100644 --- a/cmake/SDL3Config.cmake.in +++ b/cmake/SDL3Config.cmake.in @@ -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 ` 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)