summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2017-07-28 17:19:01 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-07-28 22:03:22 -0700
commite04a81bcc06cb59aac348567ecc6c1978a89ca81 (patch)
treef224bc8c12471568a77c72b14c5181477357b2d0 /CMakeLists.txt
parent939d7ee804a15c0f0c89fc964d100095cecf4b03 (diff)
downloadsubsurface-e04a81bcc06cb59aac348567ecc6c1978a89ca81.tar.gz
cmake: install QML components for Subsurface as well
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt13
1 files changed, 6 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4873f44e9..aa1f12c87 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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)")