From 6bfde029fe4cd1f7fedd775561728ec83b2c9218 Mon Sep 17 00:00:00 2001 From: sithlord48 Date: Thu, 2 Jan 2025 23:17:12 -0500 Subject: [PATCH] fix: run MacDeployQt at install time on staged app only --- deploy/mac/deploy.cmake | 4 ++++ src/apps/deskflow-gui/CMakeLists.txt | 5 ----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/deploy/mac/deploy.cmake b/deploy/mac/deploy.cmake index f69133d97..6b05be674 100644 --- a/deploy/mac/deploy.cmake +++ b/deploy/mac/deploy.cmake @@ -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") diff --git a/src/apps/deskflow-gui/CMakeLists.txt b/src/apps/deskflow-gui/CMakeLists.txt index ce28d309e..dac2c5330 100644 --- a/src/apps/deskflow-gui/CMakeLists.txt +++ b/src/apps/deskflow-gui/CMakeLists.txt @@ -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)