From 66c5e0e710abca68943e58cf7944e194239e5827 Mon Sep 17 00:00:00 2001 From: DcruBro Date: Tue, 19 May 2026 23:02:37 +0200 Subject: [PATCH] cmake --- CMakeLists.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index c66bca8..3e207eb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,6 +4,19 @@ project(Letnik3Zadnja) set(CMAKE_CXX_STANDARD 23) set(CMAKE_CXX_STANDARD_REQUIRED ON) +if(APPLE AND NOT CMAKE_OSX_SYSROOT) + execute_process( + COMMAND xcrun --sdk macosx --show-sdk-path + OUTPUT_VARIABLE _macos_sdk_path + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_QUIET + ) + + if(_macos_sdk_path) + set(CMAKE_OSX_SYSROOT "${_macos_sdk_path}" CACHE PATH "macOS SDK path" FORCE) + endif() +endif() + option(FETCH "Fetch SDL dependencies instead of using system-installed packages" OFF) # Compile flags