mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-25 04:09:36 +03:00
Multiple targets embedding the same internal framework dependency with
different code-signing attributes should not overwrite each other in the
generated `PBXBuildFile`. Extend commit 0282429c5a (Xcode: Fix
XCODE_EMBED_FRAMEWORKS when settings differ across targets, 2024-12-02,
v4.0.0-rc1~358^2) to cover target names.
Remove `FileRefToEmbedBuildFileMap` entirely, forcing CMake to
instantiate a brand-new `PBXBuildFile` reference object with a unique
ref value for every separate target embedding action, matching Xcode's
native multi-target configuration behavior.
Fixes: #27850
21 lines
544 B
CMake
21 lines
544 B
CMake
set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED "NO")
|
|
|
|
add_library(MTestLib SHARED TestLib/TestLib.c TestLib/TestLib.h)
|
|
set_target_properties(MTestLib PROPERTIES
|
|
FRAMEWORK 1
|
|
PUBLIC_HEADER TestLib/TestLib.h
|
|
)
|
|
|
|
add_executable(mapp1 MACOSX_BUNDLE main.m)
|
|
add_executable(mapp2 MACOSX_BUNDLE main.m)
|
|
|
|
set_target_properties(mapp1 PROPERTIES
|
|
XCODE_EMBED_FRAMEWORKS MTestLib
|
|
XCODE_EMBED_FRAMEWORKS_CODE_SIGN_ON_COPY ON
|
|
)
|
|
|
|
set_target_properties(mapp2 PROPERTIES
|
|
XCODE_EMBED_FRAMEWORKS MTestLib
|
|
XCODE_EMBED_FRAMEWORKS_CODE_SIGN_ON_COPY ON
|
|
)
|