Mac: support running Subsurface-mobile

Copy the required QML modules into the app bundle.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2018-05-19 14:13:35 -07:00
parent 95bfd3af29
commit 5b9c28e1c0

View file

@ -440,10 +440,15 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
string(REPLACE moc macdeployqt MACDEPLOYQT ${QT_MOC_EXECUTABLE}) string(REPLACE moc macdeployqt MACDEPLOYQT ${QT_MOC_EXECUTABLE})
install(CODE "execute_process(COMMAND ${MACDEPLOYQT} ${APP_BUNDLE_DIR} ${MACDEPLOY_ARGS})") install(CODE "execute_process(COMMAND ${MACDEPLOYQT} ${APP_BUNDLE_DIR} ${MACDEPLOY_ARGS})")
# and another hack to get the QML Components in the right place # 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/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/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)") 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\")") install(CODE "message(STATUS \"two ERRORS here about libmysqlclient and libpq not found are harmless\")")
elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows") elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
if (CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo") if (CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")