Page MenuHome

macOS: set minimum deployment target correctly
ClosedPublic

Authored by Ankit Meel (ankitm) on May 20 2021, 12:17 PM.

Details

Summary

Fixes T88419 Build opens on macOS 10.14. Can be downloaded from
https://builder.blender.org/download/experimental/ tmp-macminver

CMAKE_OSX_DEPLOYMENT_TARGET is now always the same as
OSX_MIN_DEPLOYMENT_TARGET. I don't know the historical reason of
why they were allowed to be different.

MACOSX_DEPLOYMENT_TARGET has been moved to platform_apple_xcode
because it's helpful to deduce CMAKE_OSX_DEPLOYMENT_TARGET [1] and
platform_apple is included after platform_apple_xcode. Although it seems
useless now that we're explicitly setting CMAKE_OSX_DEPLOYMENT_TARGET.
Remove it ? man clang says that MACOSX_DEPLOYMENT_TARGET is used
if mmacosx-version-min is not present.

Docs suggest that CMAKE_OSX_DEPLOYMENT_TARGET should be set before
project call. Should we do that, like in D10838, using
blender_project_hack_pre ?

[1]: https://cmake.org/cmake/help/latest/variable/CMAKE_OSX_DEPLOYMENT_TARGET.html]

Diff Detail

Repository
rB Blender
Branch
macminver (branched from master)
Build Status
Buildable 14666
Build 14666: arc lint + arc unit

Event Timeline

Ankit Meel (ankitm) requested review of this revision.May 20 2021, 12:17 PM
Ankit Meel (ankitm) created this revision.
Ankit Meel (ankitm) edited the summary of this revision. (Show Details)May 20 2021, 12:18 PM
Ankit Meel (ankitm) edited the summary of this revision. (Show Details)
Ankit Meel (ankitm) edited the summary of this revision. (Show Details)May 20 2021, 1:31 PM
Ankit Meel (ankitm) edited the summary of this revision. (Show Details)

Please decide about committing to 2.83 as well as 2.93.

Docs suggest that CMAKE_OSX_DEPLOYMENT_TARGET should be set before project call. Should we do that, like in D10838, using blender_project_hack_pre ?

If it solves an actually issue we can set it beforehand, but as far as I can tell it's not needed. If we do, it should not be done with blender_project_hack_pre, but just a regular additional include() of a new platform_apple_*.cmake file before project().

Please decide about committing to 2.83 as well as 2.93.

This should be fixed in 2.83 as well, but not that minimum there is 10.11 and there is no Arm, so the patch will need to be modified.

build_files/cmake/platform/platform_apple_xcode.cmake
173–177

Just remove setting of MACOSX_DEPLOYMENT_TARGET, it will not do anything useful.

Ankit Meel (ankitm) marked an inline comment as done.
  • Remove useless MACOSX_DEPLOYMENT_TARGET, add comments.
This revision is now accepted and ready to land.May 20 2021, 4:15 PM