summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2012-07-09 18:47:18 +0200
committerQt by Nokia <qt-info@nokia.com>2012-07-11 23:31:58 +0200
commited0f44b9c6eb484d3b423a58e04f1a18dd85e312 (patch)
tree95ad85f888179f2a72a069175f19a2beb51fdab9
parentd822eaf96297f4a7de59449748642aa3e103e185 (diff)
use centralized qml plugin project handling
Change-Id: Ic1b8f0e008f55f171f940191fca009027c105d3d Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
-rw-r--r--src/imports/bluetooth/bluetooth.pro37
-rw-r--r--src/imports/bluetooth/qbluetoothimport.pri30
-rw-r--r--src/imports/nfc/nfc.pro14
-rw-r--r--src/imports/nfc/qnfcimport.pri30
4 files changed, 2 insertions, 109 deletions
diff --git a/src/imports/bluetooth/bluetooth.pro b/src/imports/bluetooth/bluetooth.pro
index 5350df87..14270558 100644
--- a/src/imports/bluetooth/bluetooth.pro
+++ b/src/imports/bluetooth/bluetooth.pro
@@ -1,13 +1,5 @@
-TARGET = declarative_bluetooth
-TARGETPATH = QtBluetooth
-
-include(qbluetoothimport.pri)
-target.path = $$[QT_INSTALL_IMPORTS]/$$TARGETPATH
-DESTDIR = $$QT.bluetooth.imports/$$TARGETPATH
-
QT += quick bluetooth network
-# Input
HEADERS += \
qdeclarativebluetoothservice_p.h \
qdeclarativebluetoothsocket_p.h \
@@ -22,31 +14,4 @@ SOURCES += plugin.cpp \
RESOURCES += bluetooth.qrc
-# plugin.qmltypes is used by Qt Creator for syntax highlighting and the QML code model. It needs
-# to be regenerated whenever the QML elements exported by the plugin change. This cannot be done
-# automatically at compile time because qmlplugindump does not support some QML features and it may
-# not be possible when cross-compiling.
-#
-# To regenerate run 'make qmltypes' which will update the plugins.qmltypes file in the source
-# directory. Then review and commit the changes made to plugins.qmltypes.
-#
-# This will run the following command:
-# qmlplugindump <import name> <import version> <path to import plugin> > plugins.qmltypes
-# e.g.:
-# qmlplugindump QtBluetooth 5.0 imports/QtLocation/libdeclarative_bluetooth.so > plugins.qmltypes
-
-load(resolve_target)
-qmltypes.target = qmltypes
-qmltypes.commands = $$[QT_INSTALL_BINS]/qmlplugindump QtBluetooth 5.0 $$QMAKE_RESOLVED_TARGET > $$PWD/plugins.qmltypes
-message(Should execute $$qmltypes.commands)
-qmltypes.depends = $$QMAKE_RESOLVED_TARGET
-QMAKE_EXTRA_TARGETS += qmltypes
-
-# Tell qmake to create such makefile that qmldir, plugins.qmltypes and target
-# (i.e. declarative_bluetooth) are all copied to $$[QT_INSTALL_IMPORTS]/QtBluetooth directory,
-
-qmldir.files += $$PWD/qmldir $$PWD/plugins.qmltypes
-qmldir.path += $$[QT_INSTALL_IMPORTS]/$$TARGETPATH
-
-INSTALLS += target qmldir
-message(installs are $$INSTALLS)
+load(qml_plugin)
diff --git a/src/imports/bluetooth/qbluetoothimport.pri b/src/imports/bluetooth/qbluetoothimport.pri
deleted file mode 100644
index 26bf54e4..00000000
--- a/src/imports/bluetooth/qbluetoothimport.pri
+++ /dev/null
@@ -1,30 +0,0 @@
-load(qt_module)
-
-TEMPLATE = lib
-CONFIG += qt plugin
-
-win32|mac:!wince*:!win32-msvc:!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.bluetooth.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)
diff --git a/src/imports/nfc/nfc.pro b/src/imports/nfc/nfc.pro
index 5ad84d2f..61b81c2c 100644
--- a/src/imports/nfc/nfc.pro
+++ b/src/imports/nfc/nfc.pro
@@ -1,15 +1,3 @@
-TARGET = declarative_nfc
-TARGETPATH = QtNfc
-
-include(qnfcimport.pri)
-target.path = $$[QT_INSTALL_IMPORTS]/$$TARGETPATH
-DESTDIR = $$QT.nfc.imports/$$TARGETPATH
-INSTALLS += target
-
-qmldir.files += $$PWD/qmldir
-qmldir.path += $$[QT_INSTALL_IMPORTS]/$$TARGETPATH
-INSTALLS += qmldir
-
QT += declarative nfc
# Input
@@ -29,4 +17,4 @@ SOURCES += plugin.cpp \
qdeclarativendefurirecord.cpp \
qdeclarativendefmimerecord.cpp
-INSTALLS += qmldir
+load(qml_plugin)
diff --git a/src/imports/nfc/qnfcimport.pri b/src/imports/nfc/qnfcimport.pri
deleted file mode 100644
index a46295d8..00000000
--- a/src/imports/nfc/qnfcimport.pri
+++ /dev/null
@@ -1,30 +0,0 @@
-load(qt_module)
-
-TEMPLATE = lib
-CONFIG += qt plugin
-
-win32|mac:!wince*:!win32-msvc:!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.nfc.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)