mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 02:36:54 +02:00
use macdeployqt for fixup of components
This commit is contained in:
parent
a3ccf7014c
commit
e00481ddfb
1 changed files with 22 additions and 6 deletions
|
@ -14,7 +14,8 @@ macro(install_beside_console)
|
||||||
# install this component beside the installed server-console executable
|
# install this component beside the installed server-console executable
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
set(CONSOLE_APP_CONTENTS "${CONSOLE_INSTALL_APP_PATH}/Contents")
|
set(CONSOLE_APP_CONTENTS "${CONSOLE_INSTALL_APP_PATH}/Contents")
|
||||||
set(COMPONENT_DESTINATION "${CONSOLE_APP_CONTENTS}/MacOS/Components.app/Contents/MacOS")
|
set(COMPONENT_APP_PATH "${CONSOLE_APP_CONTENTS}/MacOS/Components.app")
|
||||||
|
set(COMPONENT_DESTINATION "${COMPONENT_APP_PATH}/Contents/MacOS")
|
||||||
else ()
|
else ()
|
||||||
set(COMPONENT_DESTINATION ${CONSOLE_INSTALL_DIR})
|
set(COMPONENT_DESTINATION ${CONSOLE_INSTALL_DIR})
|
||||||
endif ()
|
endif ()
|
||||||
|
@ -55,13 +56,28 @@ macro(install_beside_console)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
# during the install phase, call fixup to drop the shared libraries for these components in the right place
|
find_program(MACDEPLOYQT_COMMAND macdeployqt PATHS "${QT_DIR}/bin" NO_DEFAULT_PATH)
|
||||||
|
|
||||||
|
if (NOT MACDEPLOYQT_COMMAND AND (PRODUCTION_BUILD OR PR_BUILD))
|
||||||
|
message(FATAL_ERROR "Could not find macdeployqt at ${QT_DIR}/bin.\
|
||||||
|
It is required to produce an relocatable interface application.\
|
||||||
|
Check that the environment variable QT_DIR points to your Qt installation.\
|
||||||
|
")
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
# during the install phase, call macdeployqt to drop the shared libraries for these components in the right place
|
||||||
|
set(COMPONENTS_BUNDLE_PATH "\${CMAKE_INSTALL_PREFIX}/${COMPONENT_APP_PATH}")
|
||||||
|
string(REPLACE " " "\\ " ESCAPED_BUNDLE_NAME ${COMPONENTS_BUNDLE_PATH})
|
||||||
|
|
||||||
set(EXECUTABLE_NEEDING_FIXUP "\${CMAKE_INSTALL_PREFIX}/${COMPONENT_DESTINATION}/${TARGET_NAME}")
|
set(EXECUTABLE_NEEDING_FIXUP "\${CMAKE_INSTALL_PREFIX}/${COMPONENT_DESTINATION}/${TARGET_NAME}")
|
||||||
|
string(REPLACE " " "\\ " ESCAPED_EXECUTABLE_NAME ${EXECUTABLE_NEEDING_FIXUP})
|
||||||
|
|
||||||
install(CODE "
|
install(CODE "
|
||||||
include(BundleUtilities)
|
execute_process(COMMAND ${MACDEPLOYQT_COMMAND} ${ESCAPED_BUNDLE_NAME} -verbose=2 -executable=${ESCAPED_EXECUTABLE_NAME})"
|
||||||
fixup_bundle(\"${EXECUTABLE_NEEDING_FIXUP}\" \"\" \"${FIXUP_LIBS}\")
|
COMPONENT ${SERVER_COMPONENT}
|
||||||
" COMPONENT ${SERVER_COMPONENT})
|
)
|
||||||
endif ()
|
endif()
|
||||||
|
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
# set variables used by manual ssleay library copy
|
# set variables used by manual ssleay library copy
|
||||||
|
|
Loading…
Reference in a new issue