diff options
author | Oswald Buddenhagen <oswald.buddenhagen@digia.com> | 2013-03-01 19:05:15 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-03-12 18:13:37 +0100 |
commit | cd94b543cb00bb1b94fcd3c7db5cce85b942c827 (patch) | |
tree | aff7da50f8558419ad0efc008d68e92320f4e56d /mkspecs | |
parent | a05cedd70b006740002be9d656fbfced91e41627 (diff) |
make qml_plugin.prf usable without a parent c++ module
so far the assumption was that every qml plugin/module in qt is a
wrapper/extension of a corresponding qt module. this not the case for
the upcoming quickcontrols, for example.
Task-number: QTBUG-28200
Change-Id: If4b8bb6633e76b2a510908d09a010cee12d33634
Reviewed-by: Liang Qi <liang.qi@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'mkspecs')
-rw-r--r-- | mkspecs/features/qml_plugin.prf | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/mkspecs/features/qml_plugin.prf b/mkspecs/features/qml_plugin.prf index 7bd77179e3..70c3bd6b66 100644 --- a/mkspecs/features/qml_plugin.prf +++ b/mkspecs/features/qml_plugin.prf @@ -19,7 +19,7 @@ if(win32|mac):!macx-xcode { contains(QT_CONFIG, build_all):CONFIG += build_all } -isEmpty(CXX_MODULE) { +!no_cxx_module:isEmpty(CXX_MODULE) { CXX_MODULE = $$TARGET TARGET = declarative_$${TARGET} } @@ -30,11 +30,13 @@ exists($$QMLTYPEFILE): QML_FILES += $$QMLTYPEFILE # Install rules +load(qt_build_paths) + qml1_target { - DESTDIR = $$eval(QT.$${CXX_MODULE}.imports)/$$TARGETPATH + DESTDIR = $$MODULE_BASE_OUTDIR/imports/$$TARGETPATH instbase = $$[QT_INSTALL_IMPORTS] } else { - DESTDIR = $$eval(QT.$${CXX_MODULE}.qml)/$$TARGETPATH + DESTDIR = $$MODULE_BASE_OUTDIR/qml/$$TARGETPATH instbase = $$[QT_INSTALL_QML] } @@ -58,7 +60,14 @@ load(qt_common) # !cross_compile { build_pass|!debug_and_release { - isEmpty(IMPORT_VERSION): IMPORT_VERSION = $$eval(QT.$${CXX_MODULE}.MAJOR_VERSION).$$eval(QT.$${CXX_MODULE}.MINOR_VERSION) + isEmpty(IMPORT_VERSION) { + no_cxx_module { + IMPORT_VERSION = $$replace(MODULE_VERSION, ^(\\d+\\.\\d+).*, \\1) + isEmpty(IMPORT_VERSION): error("Must set IMPORT_VERSION") + } else { + IMPORT_VERSION = $$eval(QT.$${CXX_MODULE}.MAJOR_VERSION).$$eval(QT.$${CXX_MODULE}.MINOR_VERSION) + } + } load(resolve_target) qml1_target: \ @@ -91,7 +100,7 @@ unix|win32-g++* { !isEmpty(_QMAKE_SUPER_CACHE_): \ lib_replace.match = $$dirname(_QMAKE_SUPER_CACHE_)/[^/][^/]*/lib else: \ - lib_replace.match = $$eval(QT.$${CXX_MODULE}.libs) + lib_replace.match = $$MODULE_BASE_OUTDIR lib_replace.replace = $$[QT_INSTALL_LIBS/raw] QMAKE_PRL_INSTALL_REPLACE += lib_replace } |