Skip to content

Commit

Permalink
fix: run MacDeployQt at install time on staged app only
Browse files Browse the repository at this point in the history
  • Loading branch information
sithlord48 committed Jan 3, 2025
1 parent 351c512 commit 8ba487d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 4 additions & 0 deletions deploy/mac/deploy.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
5 changes: 0 additions & 5 deletions src/apps/deskflow-gui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 8ba487d

Please sign in to comment.