From 52d31096d20c19988f41f0399a5a4baf0e554c24 Mon Sep 17 00:00:00 2001 From: Philip Cook Date: Mon, 2 Dec 2024 08:56:14 -0500 Subject: [PATCH] BUG: wrong use of bash subshell in cmake file --- CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 572a755f..a12dda6f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,12 @@ project(ants LANGUAGES CXX) # Set the macOS SDK root if (CMAKE_SYSTEM_NAME STREQUAL "Darwin") - set(CMAKE_OSX_SYSROOT "$(xcrun --show-sdk-path)") + execute_process( + COMMAND xcrun --show-sdk-path + OUTPUT_VARIABLE SDK_PATH + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + set(CMAKE_OSX_SYSROOT ${SDK_PATH}) message(STATUS "Using macOS SDK: ${CMAKE_OSX_SYSROOT}") endif()