fix: run MacDeployQt at install time on staged app only

This commit is contained in:
sithlord48
2025-01-02 23:17:12 -05:00
committed by Nick Bolton
parent 351c5123ef
commit 6bfde029fe
2 changed files with 4 additions and 5 deletions

View File

@ -5,6 +5,10 @@
# calling CMAKE_CURRENT_LIST_DIR after include would return the wrong scope var
set(MY_DIR ${CMAKE_CURRENT_LIST_DIR})
# Install depends into our staged copy
find_program(MACDEPLOYQT_BIN macdeployqt6)
install(CODE "execute_process(COMMAND ${MACDEPLOYQT_BIN} \"\${CMAKE_INSTALL_PREFIX}/Deskflow.app\")")
set(OS_STRING "macos-${CMAKE_SYSTEM_PROCESSOR}")
set(CMAKE_INSTALL_RPATH "@loader_path/../Libraries;@loader_path/../Frameworks")
set(CPACK_PACKAGE_ICON "${MY_DIR}/dmg-volume.icns")

View File

@ -99,11 +99,6 @@ elseif(APPLE)
MACOSX_BUNDLE_LONG_VERSION_STRING ${CMAKE_PROJECT_VERSION}
MACOSX_BUNDLE_SHORT_VERSION_STRING ${CMAKE_PROJECT_VERSION}
)
find_program(MACDEPLOYQT_BIN macdeployqt6)
add_custom_command(
TARGET ${target} POST_BUILD
COMMAND ${MACDEPLOYQT_BIN} "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${target}.app"
)
install(TARGETS ${target} BUNDLE DESTINATION .)
else()
install(TARGETS ${target} DESTINATION bin)