From e04a81bcc06cb59aac348567ecc6c1978a89ca81 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Fri, 28 Jul 2017 17:19:01 -0700 Subject: cmake: install QML components for Subsurface as well Signed-off-by: Dirk Hohndel --- CMakeLists.txt | 13 ++++++------- 1 file 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)") -- cgit v1.2.3-70-g09d2