macOS: upgrade minimum required version to 10.13 High Sierra
C++17 does not work on 10.12, and Apple extended support ended for 10.12 in October 2019. Maniphest Tasks: T76783, T76184 Differential Revision: https://developer.blender.org/D8179
This commit is contained in:
parent
6435acd8f6
commit
ff444da7c4
Notes:
blender-bot
2023-02-14 06:55:40 +01:00
Referenced by issue #76783, C++ Version Upgrade Referenced by issue #76184, Library upgrades for 2.90
|
@ -118,13 +118,13 @@ else()
|
|||
OUTPUT_VARIABLE MACOSX_SDK_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
set(OSX_ARCHITECTURES x86_64)
|
||||
set(OSX_DEPLOYMENT_TARGET 10.11)
|
||||
set(OSX_DEPLOYMENT_TARGET 10.13)
|
||||
set(OSX_SYSROOT ${XCODE_DEV_PATH}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk)
|
||||
|
||||
set(PLATFORM_CFLAGS "-isysroot ${OSX_SYSROOT} -mmacosx-version-min=${OSX_DEPLOYMENT_TARGET}")
|
||||
set(PLATFORM_CXXFLAGS "-isysroot ${OSX_SYSROOT} -mmacosx-version-min=${OSX_DEPLOYMENT_TARGET} -std=c++11 -stdlib=libc++")
|
||||
set(PLATFORM_LDFLAGS "-isysroot ${OSX_SYSROOT} -mmacosx-version-min=${OSX_DEPLOYMENT_TARGET}")
|
||||
set(PLATFORM_BUILD_TARGET --build=x86_64-apple-darwin15.0.0) # OS X 10.11
|
||||
set(PLATFORM_BUILD_TARGET --build=x86_64-apple-darwin17.0.0) # OS X 10.13
|
||||
set(PLATFORM_CMAKE_FLAGS
|
||||
-DCMAKE_OSX_ARCHITECTURES:STRING=${OSX_ARCHITECTURES}
|
||||
-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=${OSX_DEPLOYMENT_TARGET}
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
# Libraries configuration for Apple.
|
||||
|
||||
set(MACOSX_DEPLOYMENT_TARGET "10.11")
|
||||
set(MACOSX_DEPLOYMENT_TARGET "10.13")
|
||||
|
||||
macro(find_package_wrapper)
|
||||
# do nothing, just satisfy the macro
|
||||
|
|
|
@ -65,13 +65,9 @@ endif()
|
|||
|
||||
message(STATUS "Detected OS X ${OSX_SYSTEM} and Xcode ${XCODE_VERSION} at ${XCODE_BUNDLE}")
|
||||
|
||||
# Older Xcode versions had different approach to the directory hiearchy.
|
||||
# Require newer Xcode which is also have better chances of being able to compile with the
|
||||
# required deployment target.
|
||||
#
|
||||
# NOTE: Xcode version 8.2 is the latest one which runs on macOS 10.11.
|
||||
if(${XCODE_VERSION} VERSION_LESS 8.2)
|
||||
message(FATAL_ERROR "Only Xcode version 8.2 and newer is supported")
|
||||
# Require a relatively recent Xcode version.
|
||||
if(${XCODE_VERSION} VERSION_LESS 10.0)
|
||||
message(FATAL_ERROR "Only Xcode version 10.0 and newer is supported")
|
||||
endif()
|
||||
|
||||
# note: xcode-select path could be ambiguous,
|
||||
|
@ -133,14 +129,14 @@ if(${CMAKE_GENERATOR} MATCHES "Xcode")
|
|||
endif()
|
||||
unset(OSX_SDKROOT)
|
||||
|
||||
# 10.11 is our min. target, if you use higher sdk, weak linking happens
|
||||
# 10.13 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)
|
||||
if(${CMAKE_OSX_DEPLOYMENT_TARGET} VERSION_LESS 10.13)
|
||||
message(STATUS "Setting deployment target to 10.13, lower versions are not supported")
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.13" CACHE STRING "" FORCE)
|
||||
endif()
|
||||
else()
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.11" CACHE STRING "" FORCE)
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.13" CACHE STRING "" FORCE)
|
||||
endif()
|
||||
|
||||
if(NOT ${CMAKE_GENERATOR} MATCHES "Xcode")
|
||||
|
|
Loading…
Reference in New Issue