mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-02 03:39:43 -06:00
XCode 16+ no longer delays our POST_BUILD phase until after bundle files like `Info.plist` are generated. Teach the Xcode generator to add explicit dependencies to the POST_BUILD phase in bundle targets to ensure the files are created before it runs. Fixes: #26656
16 lines
642 B
CMake
16 lines
642 B
CMake
enable_language(CXX)
|
|
add_executable(app MACOSX_BUNDLE app.cxx)
|
|
add_library(fw SHARED fw.cxx)
|
|
set_property(TARGET fw PROPERTY FRAMEWORK 1)
|
|
foreach(target IN ITEMS app fw)
|
|
set_property(TARGET ${target} PROPERTY XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT dwarf-with-dsym)
|
|
add_custom_command(
|
|
TARGET ${target} POST_BUILD
|
|
COMMAND ${CMAKE_COMMAND} -E sha256sum
|
|
[["$DWARF_DSYM_FOLDER_PATH/$DWARF_DSYM_FILE_NAME/Contents/Resources/DWARF/$PRODUCT_NAME"]]
|
|
[["$DWARF_DSYM_FOLDER_PATH/$DWARF_DSYM_FILE_NAME/Contents/Info.plist"]]
|
|
[["$TARGET_BUILD_DIR/$EXECUTABLE_PATH"]]
|
|
[["$TARGET_BUILD_DIR/$INFOPLIST_PATH"]]
|
|
)
|
|
endforeach()
|