diff --git a/CMakeLists.txt b/CMakeLists.txt index 3eadca279..0267368e3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,10 +4,13 @@ if(POLICY CMP0092) cmake_policy(SET CMP0092 NEW) endif() +# Value should follow latest stable Xcode's RECOMMENDED_MACOSX_DEPLOYMENT_TARGET +set(MACOS_SUPPORT_MINIMUM 10.13) + # The value of this variable should be set prior to the first project() command invocation. # See: https://cmake.org/cmake/help/latest/variable/CMAKE_OSX_DEPLOYMENT_TARGET.html if(NOT CMAKE_OSX_DEPLOYMENT_TARGET) - set(CMAKE_OSX_DEPLOYMENT_TARGET "10.13" CACHE STRING "Minimum OS X version to target for deployment" FORCE) + set(CMAKE_OSX_DEPLOYMENT_TARGET ${MACOS_SUPPORT_MINIMUM} CACHE STRING "Minimum macOS version to target for deployment" FORCE) endif() project(transmission) diff --git a/macosx/CMakeLists.txt b/macosx/CMakeLists.txt index 1764aa186..ffc7d1917 100644 --- a/macosx/CMakeLists.txt +++ b/macosx/CMakeLists.txt @@ -1,8 +1,7 @@ project(trmac) -if(CMAKE_OSX_DEPLOYMENT_TARGET VERSION_LESS 10.9) - # 10.9 required for actool to produce Assets.car - message(FATAL_ERROR "Targeting macOS versions before 10.9 is not supported, please adjust CMAKE_OSX_DEPLOYMENT_TARGET (${CMAKE_OSX_DEPLOYMENT_TARGET})") +if(CMAKE_OSX_DEPLOYMENT_TARGET VERSION_LESS MACOS_SUPPORT_MINIMUM) + message(FATAL_ERROR "Targeting macOS versions before ${MACOS_SUPPORT_MINIMUM} is not supported for the macOS project, please adjust CMAKE_OSX_DEPLOYMENT_TARGET (${CMAKE_OSX_DEPLOYMENT_TARGET})") endif() include_directories(${CMAKE_SOURCE_DIR})