use centralized qml plugin project handling
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>
Mon, 9 Jul 2012 16:49:37 +0000 (18:49 +0200)
committerQt by Nokia <qt-info@nokia.com>
Wed, 11 Jul 2012 19:23:59 +0000 (21:23 +0200)
Change-Id: I27b773b042560d3a95d943ad942e84d9aaeeba40
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
src/imports/folderlistmodel/folderlistmodel.pro
src/imports/localstorage/localstorage.pro
src/imports/particles/particles.pro
src/imports/qimportbase.pri [deleted file]
src/imports/qtquick2/qtquick2.pro
src/imports/testlib/testlib.pro
src/imports/window/window.pro
src/imports/xmllistmodel/xmllistmodel.pro

index f30c2b2..400484b 100644 (file)
@@ -1,6 +1,6 @@
+CXX_MODULE = qml
 TARGET  = qmlfolderlistmodelplugin
 TARGETPATH = Qt/labs/folderlistmodel
-include(../qimportbase.pri)
 
 QT += core-private qml qml-private v8-private
 
@@ -10,10 +10,4 @@ HEADERS += qquickfolderlistmodel.h \
     fileproperty_p.h \
     fileinfothread_p.h
 
-DESTDIR = $$QT.qml.imports/$$TARGETPATH
-target.path = $$[QT_INSTALL_IMPORTS]/$$TARGETPATH
-
-qmldir.files += $$PWD/qmldir
-qmldir.path +=  $$[QT_INSTALL_IMPORTS]/$$TARGETPATH
-
-INSTALLS += target qmldir
+load(qml_plugin)
index fa1718d..93fa9c2 100644 (file)
@@ -1,17 +1,11 @@
+CXX_MODULE = qml
 TARGET  = qmllocalstorageplugin
 TARGETPATH = QtQuick/LocalStorage
-include(../qimportbase.pri)
 
 QT += sql qml qml-private v8-private core-private
 
 SOURCES += plugin.cpp
 
-OTHER_FILES += localstorage.json
-
-DESTDIR = $$QT.qml.imports/$$TARGETPATH
-target.path = $$[QT_INSTALL_IMPORTS]/$$TARGETPATH
+load(qml_plugin)
 
-qmldir.files += $$PWD/qmldir
-qmldir.path +=  $$[QT_INSTALL_IMPORTS]/$$TARGETPATH
-
-INSTALLS += target qmldir
+OTHER_FILES += localstorage.json
index a9d0ece..d25f560 100644 (file)
@@ -1,19 +1,10 @@
+CXX_MODULE = qml
 TARGET  = particlesplugin
 TARGETPATH = QtQuick/Particles.2
-include(../qimportbase.pri)
 
 SOURCES += \
     plugin.cpp
 
 QT += quick-private quickparticles-private qml-private
 
-OTHER_FILES += \
-    qmldir
-
-DESTDIR = $$QT.qml.imports/$$TARGETPATH
-target.path = $$[QT_INSTALL_IMPORTS]/$$TARGETPATH
-
-qmldir.files += $$PWD/qmldir
-qmldir.path +=  $$[QT_INSTALL_IMPORTS]/$$TARGETPATH
-
-INSTALLS += target qmldir
+load(qml_plugin)
diff --git a/src/imports/qimportbase.pri b/src/imports/qimportbase.pri
deleted file mode 100644 (file)
index ab54e4b..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-load(qt_module)
-
-TEMPLATE = lib
-CONFIG += qt plugin
-
-win32|mac:!macx-xcode:CONFIG += debug_and_release
-
-isEmpty(TARGETPATH) {
-    error("qimportbase.pri: You must provide a TARGETPATH!")
-}
-isEmpty(TARGET) {
-    error("qimportbase.pri: You must provide a TARGET!")
-}
-
-QMLDIRFILE = $${_PRO_FILE_PWD_}/qmldir
-copy2build.input = QMLDIRFILE
-copy2build.output = $$QT.qml.imports/$$TARGETPATH/qmldir
-!contains(TEMPLATE_PREFIX, vc):copy2build.variable_out = PRE_TARGETDEPS
-copy2build.commands = $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
-copy2build.name = COPY ${QMAKE_FILE_IN}
-copy2build.CONFIG += no_link
-# `clean' should leave the build in a runnable state, which means it shouldn't delete qmldir
-copy2build.CONFIG += no_clean
-QMAKE_EXTRA_COMPILERS += copy2build
-
-TARGET = $$qtLibraryTarget($$TARGET)
-contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols
-
-load(qt_targets)
-
-wince*:LIBS += $$QMAKE_LIBS_GUI
index 3a95c5f..2cd15c7 100644 (file)
@@ -1,19 +1,10 @@
+CXX_MODULE = qml
 TARGET  = qtquick2plugin
 TARGETPATH = QtQuick.2
-include(../qimportbase.pri)
 
 SOURCES += \
     plugin.cpp
 
 QT += quick-private qml-private
 
-OTHER_FILES += \
-    qmldir
-
-DESTDIR = $$QT.qml.imports/$$TARGETPATH
-target.path = $$[QT_INSTALL_IMPORTS]/$$TARGETPATH
-
-qmldir.files += $$PWD/qmldir
-qmldir.path +=  $$[QT_INSTALL_IMPORTS]/$$TARGETPATH
-
-INSTALLS += target qmldir
+load(qml_plugin)
index dfb23ce..e94f977 100644 (file)
@@ -1,30 +1,16 @@
+CXX_MODULE = qml
 TARGET  = qmltestplugin
 TARGETPATH = QtTest
-include(../qimportbase.pri)
-
-CONFIG += qt plugin
 
 QT += qml quick qmltest qmltest-private v8-private qml-private core-private testlib
 
 SOURCES += main.cpp
 
-OTHER_FILES += testlib.json
-
-DESTDIR = $$QT.qml.imports/$$TARGETPATH
-
-target.path += $$[QT_INSTALL_IMPORTS]/QtTest
-OTHER_IMPORT_FILES = \
-    qmldir \
+QML_FILES = \
     TestCase.qml \
     SignalSpy.qml \
     testlogger.js
 
-otherImportFiles.files += $$OTHER_IMPORT_FILES
+load(qml_plugin)
 
-otherImportFiles.path = $$[QT_INSTALL_IMPORTS]/$$TARGETPATH
-
-copy2build.input = OTHER_IMPORT_FILES
-copy2build.output = $$QT.qml.imports/$$TARGETPATH/${QMAKE_FILE_BASE}${QMAKE_FILE_EXT}
-
-
-INSTALLS += target otherImportFiles
+OTHER_FILES += testlib.json
index 42b6f59..68179a8 100644 (file)
@@ -1,19 +1,10 @@
+CXX_MODULE = qml
 TARGET  = windowplugin
 TARGETPATH = QtQuick/Window.2
-include(../qimportbase.pri)
 
 SOURCES += \
     plugin.cpp
 
 QT += quick-private qml-private
 
-OTHER_FILES += \
-    qmldir
-
-DESTDIR = $$QT.qml.imports/$$TARGETPATH
-target.path = $$[QT_INSTALL_IMPORTS]/$$TARGETPATH
-
-qmldir.files += $$PWD/qmldir
-qmldir.path +=  $$[QT_INSTALL_IMPORTS]/$$TARGETPATH
-
-INSTALLS += target qmldir
+load(qml_plugin)
index 8c056e8..09d5666 100644 (file)
@@ -1,16 +1,10 @@
+CXX_MODULE = qml
 TARGET  = qmlxmllistmodelplugin
 TARGETPATH = QtQuick/XmlListModel
-include(../qimportbase.pri)
 
 QT += network qml xmlpatterns qml-private v8-private core-private
 
 SOURCES += qqmlxmllistmodel.cpp plugin.cpp
 HEADERS += qqmlxmllistmodel_p.h
 
-DESTDIR = $$QT.qml.imports/$$TARGETPATH
-target.path = $$[QT_INSTALL_IMPORTS]/$$TARGETPATH
-
-qmldir.files += $$PWD/qmldir
-qmldir.path +=  $$[QT_INSTALL_IMPORTS]/$$TARGETPATH
-
-INSTALLS += target qmldir
\ No newline at end of file
+load(qml_plugin)