Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -707,6 +707,18 @@ set(CPACK_SOURCE_GENERATOR "TGZ")

include(CPack)

#===============================================================================
#= macOS: Fix broken symlinks after macdeployqt
#-------------------------------------------------------------------------------

if(APPLE)
add_custom_target(fixup_bundle
COMMAND ${CMAKE_COMMAND} -E echo "Fixing broken symlinks in the app bundle..."
COMMAND bash -c "[ -d ${EXECUTABLE_OUTPUT_PATH}/DSView.app ] && find ${EXECUTABLE_OUTPUT_PATH}/DSView.app/Contents/Frameworks -type l | while read symlink; do [ ! -e \"$$symlink\" ] && echo \" Fixing: $$symlink\" && rm \"$$symlink\" && mkdir -p \"$$symlink\"; done || echo ' DSView.app not found, skipping'"
COMMENT "Fix broken symlinks in macOS app bundle (run 'make fixup_bundle' after macdeployqt)"
)
endif()

#===============================================================================
#= Tests
#-------------------------------------------------------------------------------
Expand Down
Loading