From 1e0665557adc170d4b76bf988e4c3bed3b21d6c6 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 9 Jul 2012 18:59:52 +0200 Subject: use centralized qml plugin project handling Change-Id: Ibe9b056e783f78d2cb2622a174619e4cf36372af Reviewed-by: Rohan McGovern --- .gitignore | 1 + src/imports/location/location.pro | 40 +--------------------- src/imports/location/qlocationimport.pri | 31 ----------------- .../declarativetestplugin.pro | 16 ++------- 4 files changed, 4 insertions(+), 84 deletions(-) delete mode 100644 src/imports/location/qlocationimport.pri diff --git a/.gitignore b/.gitignore index 0a4ad4bb..c29326ae 100644 --- a/.gitignore +++ b/.gitignore @@ -176,6 +176,7 @@ config.tests/unix/sse2/sse2 debug examples/tools/plugandpaint/plugins +imports/* include/* include/*/* lib/* diff --git a/src/imports/location/location.pro b/src/imports/location/location.pro index a2b43169..f7388b3d 100644 --- a/src/imports/location/location.pro +++ b/src/imports/location/location.pro @@ -1,13 +1,5 @@ -TARGET = declarative_location -TARGETPATH = QtLocation - -include(qlocationimport.pri) - QT += quick-private network location-private qml-private 3d core-private gui-private -DESTDIR = $$QT.location.imports/$$TARGETPATH -target.path = $$[QT_INSTALL_IMPORTS]/$$TARGETPATH - INCLUDEPATH += ../../location INCLUDEPATH += ../../location/maps INCLUDEPATH *= $$PWD @@ -23,10 +15,6 @@ win32 { } } -# On some platforms, build both versions because debug and release -# versions are incompatible -#win32|mac:!wince*:!win32-msvc:!macx-xcode:CONFIG += debug_and_release - HEADERS += qdeclarativeposition_p.h \ qdeclarativepositionsource_p.h \ qdeclarativecoordinate_p.h \ @@ -98,33 +86,7 @@ SOURCES += qdeclarativeposition.cpp \ include(declarativeplaces/declarativeplaces.pri) -# 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 > plugins.qmltypes -# e.g.: -# qmlplugindump QtLocation 5.0 imports/QtLocation/libdeclarative_location.so > plugins.qmltypes - -load(resolve_target) -qmltypes.target = qmltypes -qmltypes.commands = $$[QT_INSTALL_BINS]/qmlplugindump QtLocation 5.0 $$QMAKE_RESOLVED_TARGET > $$PWD/plugins.qmltypes -qmltypes.depends = $$QMAKE_RESOLVED_TARGET -QMAKE_EXTRA_TARGETS += qmltypes - -# Tell qmake to create such makefile that qmldir, plugins.qmltypes and target -# (i.e. declarative_location) are all copied to $$[QT_INSTALL_IMPORTS]/QtLocation directory, - -qmldir.files += $$PWD/qmldir $$PWD/plugins.qmltypes -qmldir.path += $$[QT_INSTALL_IMPORTS]/$$TARGETPATH - -INSTALLS += target qmldir +load(qml_plugin) OTHER_FILES += \ plugin.json - diff --git a/src/imports/location/qlocationimport.pri b/src/imports/location/qlocationimport.pri deleted file mode 100644 index 574de84b..00000000 --- a/src/imports/location/qlocationimport.pri +++ /dev/null @@ -1,31 +0,0 @@ -load(qt_build_config) - -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.location.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 diff --git a/tests/plugins/declarativetestplugin/declarativetestplugin.pro b/tests/plugins/declarativetestplugin/declarativetestplugin.pro index 7d3c20f0..4803e672 100644 --- a/tests/plugins/declarativetestplugin/declarativetestplugin.pro +++ b/tests/plugins/declarativetestplugin/declarativetestplugin.pro @@ -1,13 +1,9 @@ +CXX_MODULE = location TARGET = declarative_location_test TARGETPATH = QtLocation/test -include(../../../src/imports/location/qlocationimport.pri) - QT += qml quick location testlib -DESTDIR = $$QT.location.imports/$$TARGETPATH -target.path = $$[QT_INSTALL_IMPORTS]/$$TARGETPATH - INCLUDEPATH += ../../../src/imports/location INCLUDEPATH += ../../../src/location @@ -21,12 +17,4 @@ SOURCES += locationtest.cpp \ qdeclarativelocationtestmodel.cpp \ ../../../src/imports/location/qdeclarativecoordinate.cpp -# Tell qmake to create such makefile that qmldir and target (i.e. declarative_location) -# are both copied to qt/imports/QtLocation -directory, -# as the "/imports" is the default place where qmlviewer looks for plugins -# (otherwise qmlviewer -I -option is needed) - -qmldir.files += $$PWD/qmldir -qmldir.path += $$[QT_INSTALL_IMPORTS]/$$TARGETPATH - -INSTALLS += target qmldir +load(qml_plugin) -- cgit v1.2.1