cmake: set SYSTEM property in SDL3Config.cmake for compatibility with older CMake versions

This commit is contained in:
Anonymous Maarten 2024-04-01 20:09:51 +02:00
parent 5f763083fc
commit 63cb541797
2 changed files with 3 additions and 3 deletions

View File

@ -3212,9 +3212,6 @@ endif()
add_library(SDL3_Headers INTERFACE) add_library(SDL3_Headers INTERFACE)
add_library(SDL3::Headers ALIAS SDL3_Headers) add_library(SDL3::Headers ALIAS SDL3_Headers)
set_property(TARGET SDL3_Headers PROPERTY EXPORT_NAME "Headers") set_property(TARGET SDL3_Headers PROPERTY EXPORT_NAME "Headers")
if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.25")
set_property(TARGET SDL3_Headers PROPERTY EXPORT_NO_SYSTEM "TRUE")
endif()
target_include_directories(SDL3_Headers target_include_directories(SDL3_Headers
INTERFACE INTERFACE
"$<BUILD_INTERFACE:${SDL3_BINARY_DIR}/include>" "$<BUILD_INTERFACE:${SDL3_BINARY_DIR}/include>"

View File

@ -14,6 +14,9 @@ set(_sdl3_framework @SDL_FRAMEWORK@)
# Find SDL3::Headers # Find SDL3::Headers
if(NOT TARGET SDL3::Headers) if(NOT TARGET SDL3::Headers)
include("${CMAKE_CURRENT_LIST_DIR}/SDL3headersTargets.cmake") include("${CMAKE_CURRENT_LIST_DIR}/SDL3headersTargets.cmake")
if(NOT CMAKE_VERSION VERSION_LESS "3.25")
set_property(TARGET SDL3::Headers PROPERTY SYSTEM 0)
endif()
endif() endif()
set(SDL3_Headers_FOUND TRUE) set(SDL3_Headers_FOUND TRUE)