Files
cmake/Tests/RunCMake/XcodeProject-Embed/EmbedFrameworksGenex.cmake
T
Tor Arne Vestbø 90c03329dd Xcode: Honor generator expressions in XCODE_EMBED_<type>
Evaluate the XCODE_EMBED_<type> target property through the generator
expression evaluator before building the copy-files phase.  Xcode shares
one copy-files build phase across all configurations, so the embedded set
cannot vary by configuration.  Reject any expression whose result depends
on the configuration, matching the existing per-source diagnostic.

Fixes #28082
2026-09-11 16:45:25 +02:00

10 lines
366 B
CMake

# A generator expression whose result does not depend on the configuration is
# honored. Here it resolves to the name of a framework target to embed.
add_library(embedded SHARED func.m)
set_target_properties(embedded PROPERTIES FRAMEWORK TRUE)
add_executable(app MACOSX_BUNDLE main.m)
set_target_properties(app PROPERTIES
XCODE_EMBED_FRAMEWORKS "$<1:embedded>"
)