From 7d865406d6ccc538f9fd658a0d2b557e115d6919 Mon Sep 17 00:00:00 2001 From: Dominik Holland Date: Fri, 24 Feb 2017 14:00:55 +0100 Subject: Use the INSTALL_PREFIX config variable for selecting the install location Install all qml files as well as qml plugins into the location defined by INSTALL_PREFIX into an neptune folder. If no INSTALL_PREFIX is set it will fall back to /opt Task-number: QTAUTO-276 Change-Id: Iea762c8ff87a1b0ef53aa71bf7ca51e9cddcc0e0 Reviewed-by: Robert Griebl --- neptuneui.pro | 9 ++++++++- plugins/comtqci18ndemo/comtqci18ndemo.pro | 6 +++++- plugins/datasource/datasource.pro | 6 ++++-- plugins/screenmanager/screenmanager.pro | 6 +++++- 4 files changed, 22 insertions(+), 5 deletions(-) diff --git a/neptuneui.pro b/neptuneui.pro index ac69c48..397ddc8 100644 --- a/neptuneui.pro +++ b/neptuneui.pro @@ -1,10 +1,17 @@ include(doc/doc.pri) + TEMPLATE = subdirs SUBDIRS = plugins/datasource \ plugins/screenmanager \ plugins/comtqci18ndemo -qml.files = apps imports sysui i18n am-config.yaml Main*.qml +isEmpty(INSTALL_PREFIX) { + INSTALL_PREFIX=/opt +} +qml.files = apps imports sysui i18n am-config.yaml Main*.qml +qml.path = $$INSTALL_PREFIX/neptune INSTALLS += qml + +OTHER_FILES += $$files($$PWD/*.qml, true) diff --git a/plugins/comtqci18ndemo/comtqci18ndemo.pro b/plugins/comtqci18ndemo/comtqci18ndemo.pro index bc692c0..c29a44d 100644 --- a/plugins/comtqci18ndemo/comtqci18ndemo.pro +++ b/plugins/comtqci18ndemo/comtqci18ndemo.pro @@ -23,8 +23,12 @@ OTHER_FILES = qmldir PRE_TARGETDEPS += $$copy_qmldir.target } +isEmpty(INSTALL_PREFIX) { + INSTALL_PREFIX=/opt +} + qmldir.files = qmldir -installPath = $$[QT_INSTALL_QML]/$$replace(uri, \\., /) +installPath = $$INSTALL_PREFIX/neptune/imports/shared/$$replace(uri, \\., /) qmldir.path = $$installPath target.path = $$installPath INSTALLS += target qmldir diff --git a/plugins/datasource/datasource.pro b/plugins/datasource/datasource.pro index 0877426..2db0949 100644 --- a/plugins/datasource/datasource.pro +++ b/plugins/datasource/datasource.pro @@ -23,7 +23,9 @@ HEADERS += \ OTHER_FILES = qmldir - +isEmpty(INSTALL_PREFIX) { + INSTALL_PREFIX=/opt +} !equals(_PRO_FILE_PWD_, $$OUT_PWD) { copy_qmldir.target = $$OUT_PWD/qmldir @@ -34,7 +36,7 @@ OTHER_FILES = qmldir } qmldir.files = qmldir -installPath = $$[QT_INSTALL_QML]/$$replace(uri, \\., /) +installPath = $$INSTALL_PREFIX/neptune/imports/shared/$$replace(uri, \\., /) qmldir.path = $$installPath target.path = $$installPath INSTALLS += target qmldir diff --git a/plugins/screenmanager/screenmanager.pro b/plugins/screenmanager/screenmanager.pro index 2681be6..00073fc 100644 --- a/plugins/screenmanager/screenmanager.pro +++ b/plugins/screenmanager/screenmanager.pro @@ -23,8 +23,12 @@ OTHER_FILES = qmldir PRE_TARGETDEPS += $$copy_qmldir.target } +isEmpty(INSTALL_PREFIX) { + INSTALL_PREFIX=/opt +} + qmldir.files = qmldir -installPath = $$[QT_INSTALL_QML]/$$replace(uri, \\., /) +installPath = $$INSTALL_PREFIX/neptune/imports/shared/$$replace(uri, \\., /) qmldir.path = $$installPath target.path = $$installPath INSTALLS += target qmldir -- cgit v1.2.1