mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
cmake: install QML components for Subsurface as well
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
939d7ee804
commit
e04a81bcc0
1 changed files with 6 additions and 7 deletions
|
@ -387,9 +387,7 @@ if(ANDROID)
|
|||
endif()
|
||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
set(APP_BUNDLE_DIR "${SUBSURFACE_TARGET}.app")
|
||||
if(${SUBSURFACE_TARGET_EXECUTABLE} MATCHES "MobileExecutable")
|
||||
set(EXTRA_MACDEPLOY_ARGS "-qmldir=${APP_BUNDLE_DIR}/Contents/Frameworks/qml ")
|
||||
endif()
|
||||
set(EXTRA_MACDEPLOY_ARGS "-qmldir=${APP_BUNDLE_DIR}/Contents/Resources/qml ")
|
||||
set(MACDEPLOY_ARGS "${EXTRA_MACDEPLOY_ARGS}-executable=${APP_BUNDLE_DIR}/Contents/MacOS/${SUBSURFACE_TARGET} -always-overwrite")
|
||||
set(RESOURCEDIR ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/Resources)
|
||||
set(PLUGINDIR ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/PlugIns)
|
||||
|
@ -404,6 +402,7 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
|||
install(FILES ${TRANSLATIONS} DESTINATION ${RESOURCEDIR}/translations)
|
||||
install(FILES ${QTTRANSLATIONS} DESTINATION ${RESOURCEDIR}/translations)
|
||||
install(FILES ${CMAKE_SOURCE_DIR}/gpl-2.0.txt DESTINATION ${RESOURCEDIR})
|
||||
install(CODE "execute_process(COMMAND mkdir -p ${RESOURCEDIR}/qml)")
|
||||
# this is a HACK
|
||||
if((${SUBSURFACE_TARGET_EXECUTABLE} MATCHES "DesktopExecutable") AND (NOT NO_PRINTING))
|
||||
install(DIRECTORY ${Grantlee5_DIR}/../../grantlee DESTINATION ${PLUGINDIR})
|
||||
|
@ -412,10 +411,10 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
|||
string(REPLACE moc macdeployqt MACDEPLOYQT ${QT_MOC_EXECUTABLE})
|
||||
install(CODE "execute_process(COMMAND ${MACDEPLOYQT} ${APP_BUNDLE_DIR} ${MACDEPLOY_ARGS})")
|
||||
# and another hack to get the QML Components in the right place
|
||||
if(${SUBSURFACE_TARGET_EXECUTABLE} MATCHES "MobileExecutable")
|
||||
install(CODE "execute_process(COMMAND mkdir -p ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/Frameworks/qml)")
|
||||
install(CODE "execute_process(COMMAND cp -a ${_qt5Core_install_prefix}/qml/QtQuick ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/Frameworks/qml)")
|
||||
endif()
|
||||
install(CODE "execute_process(COMMAND mkdir -p ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/Frameworks/qml)")
|
||||
install(CODE "execute_process(COMMAND cp -a ${_qt5Core_install_prefix}/qml/QtQuick.2 ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/Resources/qml)")
|
||||
install(CODE "execute_process(COMMAND cp -a ${_qt5Core_install_prefix}/qml/QtLocation ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/Resources/qml)")
|
||||
install(CODE "execute_process(COMMAND cp -a ${_qt5Core_install_prefix}/qml/QtPositioning ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/Resources/qml)")
|
||||
if(NOT NO_MARBLE)
|
||||
# more hackery - this time for QtXml which is needed by libssrfmarblewidget
|
||||
install(CODE "execute_process(COMMAND cp -a ${_qt5Core_install_prefix}/lib/QtXml.framework ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/Frameworks)")
|
||||
|
|
Loading…
Add table
Reference in a new issue