Skip to content

Commit

Permalink
compare major
Browse files Browse the repository at this point in the history
  • Loading branch information
dylan-conway committed Sep 17, 2024
1 parent 3d68a94 commit c74ec5a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmake/tools/SetupMacSDK.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ if(DEFINED ENV{CI})
else()
execute_process(
COMMAND xcrun --sdk macosx --show-sdk-version
OUTPUT_VARIABLE DEFAULT_OSX_DEPLOYMENT_TARGET
OUTPUT_VARIABLE CURRENT_OSX_DEPLOYMENT_TARGET
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_VARIABLE DEFAULT_OSX_DEPLOYMENT_TARGET_ERROR
ERROR_STRIP_TRAILING_WHITESPACE
Expand All @@ -14,6 +14,8 @@ else()
message(WARNING "Failed to find macOS SDK version, did you run `xcode-select --install`?")
message(FATAL_ERROR ${DEFAULT_OSX_DEPLOYMENT_TARGET_ERROR})
endif()

string(REGEX MATCH "^[0-9]*" DEFAULT_OSX_DEPLOYMENT_TARGET ${CURRENT_OSX_DEPLOYMENT_TARGET})
endif()

optionx(CMAKE_OSX_DEPLOYMENT_TARGET STRING "The macOS SDK version to target" DEFAULT ${DEFAULT_OSX_DEPLOYMENT_TARGET})
Expand Down

0 comments on commit c74ec5a

Please sign in to comment.