add qml1_{module,plugin}.prf
authorOswald Buddenhagen <oswald.buddenhagen@digia.com>
Fri, 26 Oct 2012 13:26:34 +0000 (15:26 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Tue, 30 Oct 2012 20:46:43 +0000 (21:46 +0100)
these are in fact thin wrappers around the qml2 variants, which got
respective hooks.

Change-Id: I1190856aea3f454b6f163e147d39c707a35ec4c6
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
mkspecs/features/qml1_module.prf [new file with mode: 0644]
mkspecs/features/qml1_plugin.prf [new file with mode: 0644]
mkspecs/features/qml_module.prf
mkspecs/features/qml_plugin.prf

diff --git a/mkspecs/features/qml1_module.prf b/mkspecs/features/qml1_module.prf
new file mode 100644 (file)
index 0000000..8bacddc
--- /dev/null
@@ -0,0 +1,2 @@
+CONFIG += qml1_target
+load(qml_module)
diff --git a/mkspecs/features/qml1_plugin.prf b/mkspecs/features/qml1_plugin.prf
new file mode 100644 (file)
index 0000000..2914c78
--- /dev/null
@@ -0,0 +1,2 @@
+CONFIG += qml1_target
+load(qml_plugin)
index 10ee3bf..03ef882 100644 (file)
@@ -9,6 +9,11 @@ for(qmlf, QML_FILES): fq_qml_files += $$absolute_path($$qmlf, $$_PRO_FILE_PWD_)
 # Only for Qt Creator's project view
 OTHER_FILES += $$fq_qml_files
 
+qml1_target: \
+    instbase = $$[QT_INSTALL_IMPORTS]/QtDeclarative
+else: \
+    instbase = $$[QT_INSTALL_IMPORTS]
+
 exists($$[QT_HOST_PREFIX]/.qmake.cache) {
     # These bizarre rules copy the files to the qtbase build directory
 
@@ -17,7 +22,7 @@ exists($$[QT_HOST_PREFIX]/.qmake.cache) {
     }
 
     qmlfiles2build.input = fq_qml_files
-    qmlfiles2build.output = $$[QT_INSTALL_IMPORTS]/$$TARGETPATH/${QMAKE_FUNC_FILE_IN_qmlModStripSrcDir}
+    qmlfiles2build.output = $$instbase/$$TARGETPATH/${QMAKE_FUNC_FILE_IN_qmlModStripSrcDir}
     !contains(TEMPLATE, vc.*): qmlfiles2build.variable_out = PRE_TARGETDEPS
     qmlfiles2build.commands = $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
     qmlfiles2build.name = COPY ${QMAKE_FILE_IN}
@@ -29,5 +34,5 @@ exists($$[QT_HOST_PREFIX]/.qmake.cache) {
 # Install rules
 qmldir.base = $$_PRO_FILE_PWD_
 qmldir.files = $$fq_qml_files
-qmldir.path = $$[QT_INSTALL_IMPORTS]/$$TARGETPATH
+qmldir.path = $$instbase/$$TARGETPATH
 INSTALLS += qmldir
index 8a24e9b..b938bf4 100644 (file)
@@ -24,7 +24,12 @@ exists($$QMLTYPEFILE): QML_FILES += $$QMLTYPEFILE
 
 # Install rules
 
-target.path = $$[QT_INSTALL_IMPORTS]/$$TARGETPATH
+qml1_target: \
+    instbase = $$[QT_INSTALL_IMPORTS]/QtDeclarative
+else: \
+    instbase = $$[QT_INSTALL_IMPORTS]
+
+target.path = $$instbase/$$TARGETPATH
 INSTALLS += target
 
 # Some final setup
@@ -46,10 +51,15 @@ load(qt_targets)
         isEmpty(IMPORT_VERSION): IMPORT_VERSION = $$eval(QT.$${CXX_MODULE}.MAJOR_VERSION).$$eval(QT.$${CXX_MODULE}.MINOR_VERSION)
 
         load(resolve_target)
-        qtPrepareTool(QMLPLUGINDUMP, qmlplugindump)
+        qml1_target: \
+            qmlplugindump = qml1plugindump
+        else: \
+            qmlplugindump = qmlplugindump
+        qtPrepareTool(QMLPLUGINDUMP, $$qmlplugindump)
         importpath.value =
         for(qmod, QMAKEMODULES) {
             qmod = $$section(qmod, /, 0, -3)/imports
+            qml1_target: qmod = $$qmod/QtDeclarative
             exists($$qmod): importpath.value += $$shell_path($$qmod)
         }
         importpath.name = QML_IMPORT_PATH