diff --git a/extern/draco/CMakeLists.txt b/extern/draco/CMakeLists.txt index 628d2b8389b..0f52722e3a2 100644 --- a/extern/draco/CMakeLists.txt +++ b/extern/draco/CMakeLists.txt @@ -29,3 +29,13 @@ target_include_directories(extern_draco PUBLIC "${INC}") target_link_libraries(extern_draco PUBLIC "${LIB}") blender_source_group(extern_draco "${SRC}") + +if (APPLE) + # On macOS, prevent the draco library (already present in the application bundle) from being wrongly copied into the + # Xcode archive used for application distribution, which pollutes the archive and prevents it from being properly + # recognized. This effectively corrects a bad implicit CMake behavior for `SHARED` library targets on Xcode. + set_target_properties(extern_draco PROPERTIES + XCODE_ATTRIBUTE_SKIP_INSTALL "YES" + XCODE_ATTRIBUTE_INSTALL_PATH "" + ) +endif() diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index f710fe33618..334986b16c7 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -1614,6 +1614,12 @@ elseif(APPLE) MACOSX_BUNDLE_LONG_VERSION_STRING "${BLENDER_VERSION}.${BLENDER_VERSION_PATCH} ${BLENDER_DATE}" ) + # Xcode Archiving support for distributing the application (Testflight, App Store Connect, etc...) + set_target_properties(blender PROPERTIES + XCODE_ATTRIBUTE_SKIP_INSTALL "NO" + XCODE_ATTRIBUTE_INSTALL_PATH "$(LOCAL_APPS_DIR)" + ) + if(WITH_BLENDER_THUMBNAILER) set(OSX_THUMBNAILER_SOURCEDIR ${OSX_APP_SOURCEDIR}/Contents/PlugIns/blender-thumbnailer.appex) set_target_properties(blender-thumbnailer PROPERTIES