From 5b9c28e1c0c4d3c3e5d6a843481b5fc9a171cbf9 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sat, 19 May 2018 14:13:35 -0700 Subject: Mac: support running Subsurface-mobile Copy the required QML modules into the app bundle. Signed-off-by: Dirk Hohndel --- CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index d540f1187..38e786524 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -440,10 +440,15 @@ 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 - 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((${SUBSURFACE_TARGET_EXECUTABLE} MATCHES "MobileExecutable")) + install(CODE "execute_process(COMMAND cp -a ${_qt5Core_install_prefix}/qml/QtQuick ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/Resources/qml)") + install(CODE "execute_process(COMMAND cp -a ${_qt5Core_install_prefix}/qml/QtGraphicalEffects ${CMAKE_BINARY_DIR}/${APP_BUNDLE_DIR}/Contents/Resources/qml)") + install(CODE "execute_process(COMMAND cp -a ${_qt5Core_install_prefix}/qml/QtQml ${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)") + endif() install(CODE "message(STATUS \"two ERRORS here about libmysqlclient and libpq not found are harmless\")") elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows") if (CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo") -- cgit v1.2.3-70-g09d2