Merge pull request #6721 from symless/issue-6720-macdeployqt-cmake

Adding macdeployqt to cmake
This commit is contained in:
Jnewbon 2020-07-13 11:01:30 +01:00 committed by GitHub
commit 9f7101139e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

View file

@ -19,6 +19,7 @@ Enhancements:
- #6688 Fully migrate CI from Jenkins to Azure Pipelines
- #6718 Action to test PR's for updated changelog
- #6722 Allow servers to be announced by screen name instead of IP
- #6720 Add macqtdeploy to cmake
Features:
- #6538 System-wide config for all system users

View file

@ -25,6 +25,13 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
list (APPEND LEGACY_GUI_SOURCE_FILES ${LEGACY_GUI_MAC_SOURCE_FILES})
endif()
# Retrieve the absolute path to qmake and then use that path to find
# the binaries
get_target_property(_qmake_executable Qt5::qmake IMPORTED_LOCATION)
get_filename_component(_qt_bin_dir "${_qmake_executable}" DIRECTORY)
find_program(WINDEPLOYQT_EXECUTABLE windeployqt HINTS "${_qt_bin_dir}")
find_program(MACDEPLOYQT_EXECUTABLE macdeployqt HINTS "${_qt_bin_dir}")
if (SYNERGY_ENTERPRISE)
list (REMOVE_ITEM LEGACY_GUI_SOURCE_FILES ${LEGACY_ACTIVATION_FILES})
list (REMOVE_ITEM LEGACY_GUI_UI_FILES ${LEGACY_ACTIVATION_FILES})
@ -77,6 +84,9 @@ endif()
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
install (TARGETS synergy DESTINATION ${SYNERGY_BUNDLE_BINARY_DIR})
install (CODE "MESSAGE (\"Running macdeployqt to install frameworks in bundle\")")
install (CODE "execute_process(COMMAND ${MACDEPLOYQT_EXECUTABLE}
${SYNERGY_BUNDLE_APP_DIR} -always-overwrite)")
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
install (TARGETS synergy DESTINATION bin)
endif()