1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-25 17:17:31 +00:00

build: move CMAKE_OSX_DEPLOYMENT_TARGET FATAL_ERROR next to its default setting (#4323)

This commit is contained in:
Cœur 2022-12-15 00:11:32 +08:00 committed by GitHub
parent b0eaec47cd
commit 0b0f8704d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View file

@ -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)

View file

@ -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})