From 63cb5417975b0fa4f59c974c745e9fd71a1bf075 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Mon, 1 Apr 2024 20:09:51 +0200 Subject: [PATCH] cmake: set SYSTEM property in SDL3Config.cmake for compatibility with older CMake versions --- CMakeLists.txt | 3 --- cmake/SDL3Config.cmake.in | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ff7c702f6..4e7315be9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3212,9 +3212,6 @@ endif() add_library(SDL3_Headers INTERFACE) add_library(SDL3::Headers ALIAS SDL3_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 INTERFACE "$" diff --git a/cmake/SDL3Config.cmake.in b/cmake/SDL3Config.cmake.in index 10f87283b..e2ca50edc 100644 --- a/cmake/SDL3Config.cmake.in +++ b/cmake/SDL3Config.cmake.in @@ -14,6 +14,9 @@ set(_sdl3_framework @SDL_FRAMEWORK@) # Find SDL3::Headers if(NOT TARGET SDL3::Headers) 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() set(SDL3_Headers_FOUND TRUE)