macOS build: set minimum deployment target correctly

Equivalent of D11323 for 2.83. Make `CMAKE_OSX_DEPLOYMENT_TARGET`
independent of buildbot settings and always set to 10.11.
That fixes the launch error on OS older than buildbot's.

Maniphest Tasks: T88419
Differential Revision: https://developer.blender.org/D11328
This commit is contained in:
Ankit Meel 2021-05-20 22:38:57 +05:30
parent fd30365201
commit 704f56d68f

View file

@ -134,14 +134,7 @@ endif()
unset(OSX_SDKROOT)
# 10.11 is our min. target, if you use higher sdk, weak linking happens
if(CMAKE_OSX_DEPLOYMENT_TARGET)
if(${CMAKE_OSX_DEPLOYMENT_TARGET} VERSION_LESS 10.11)
message(STATUS "Setting deployment target to 10.11, lower versions are not supported")
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.11" CACHE STRING "" FORCE)
endif()
else()
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.11" CACHE STRING "" FORCE)
endif()
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.11" CACHE STRING "" FORCE)
if(NOT ${CMAKE_GENERATOR} MATCHES "Xcode")
# Force CMAKE_OSX_DEPLOYMENT_TARGET for makefiles, will not work else (CMake bug?)