adjust to qt_plugin.prf changes
authorOswald Buddenhagen <oswald.buddenhagen@digia.com>
Thu, 25 Oct 2012 15:34:15 +0000 (17:34 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Mon, 5 Nov 2012 13:03:02 +0000 (14:03 +0100)
DESTDIR and INSTALLS+=target are set up automatically now, but
PLUGIN_TYPE needs to be defined.
TEMPLATE, some CONFIG flags and TARGET munging are unnecessary, too.

this contains a nasty hack for examples, as we don't want users to use
the internal prf files.

Change-Id: I9af75f3040fd45d87ec9daea27e00588796ebe81
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
examples/designer/arthurplugin/arthurplugin.pro
examples/designer/containerextension/containerextension.pro
examples/designer/customwidgetplugin/customwidgetplugin.pro
examples/designer/taskmenuextension/taskmenuextension.pro
examples/designer/worldtimeclockplugin/worldtimeclockplugin.pro
src/designer/src/plugins/activeqt/activeqt.pro
src/designer/src/plugins/plugins.pri
src/designer/src/plugins/qwebview/qwebview.pro
src/designer/src/plugins/tools/view3d/view3d.pro

index 4b48144..d8ffc3b 100644 (file)
@@ -1,9 +1,21 @@
+QT += designer
+
+QTDIR_build {
+# This is only for the Qt build. Do not use externally. We mean it.
+PLUGIN_TYPE = designer
+load(qt_plugin)
+} else {
+# Public example:
 
 CONFIG      += plugin
-QT          += designer
 TEMPLATE    = lib
-TARGET = $$qtLibraryTarget(arthurplugin)
-DESTDIR = $$QT.designer.plugins/designer
+
+TARGET = $$qtLibraryTarget($$TARGET)
+
+target.path = $$[QT_INSTALL_PLUGINS]/designer
+INSTALLS += target
+
+}
 
 contains(QT_CONFIG, opengl) {
     DEFINES += QT_OPENGL_SUPPORT
@@ -41,10 +53,9 @@ HEADERS = \
 RESOURCES += arthur_plugin.qrc
 
 # install
-target.path = $$[QT_INSTALL_PLUGINS]/designer
 sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro *.jpg *.png
 sources.path = $$[QT_INSTALL_EXAMPLES]/qttools/designer/arthurplugin
-INSTALLS += target sources
+INSTALLS += sources
 
 win32-msvc* {
     QMAKE_CFLAGS += /Zm500
index 8696209..a146712 100644 (file)
@@ -1,12 +1,25 @@
+QTDIR_build {
+# This is only for the Qt build. Do not use externally. We mean it.
+PLUGIN_TYPE = designer
+load(qt_plugin)
+} else {
+# Public example:
+
 #! [0]
 TEMPLATE = lib
+CONFIG  += plugin
 #! [0]
+
 TARGET   = $$qtLibraryTarget($$TARGET)
+
+target.path = $$[QT_INSTALL_PLUGINS]/designer
+INSTALLS += target
+
+}
+
 #! [1]
-CONFIG  += plugin
 QT      += widgets designer
 #! [1]
-DESTDIR = $$QT.designer.plugins/designer
 
 #! [2]
 HEADERS += multipagewidget.h \
@@ -23,8 +36,7 @@ OTHER_FILES += multipagewidget.json
 #! [2]
 
 # install
-target.path = $$[QT_INSTALL_PLUGINS]/designer
 sources.files = $$SOURCES $$HEADERS *.pro
 sources.path = $$[QT_INSTALL_EXAMPLES]/qttools/designer/containerextension
-INSTALLS += target sources
+INSTALLS += sources
 
index 1ff6aa7..db65386 100644 (file)
@@ -1,12 +1,25 @@
-#! [0] #! [1]
-CONFIG      += plugin
+#! [0]
 QT          += widgets designer
 #! [0]
-TARGET      = $$qtLibraryTarget($$TARGET)
+
+QTDIR_build {
+# This is only for the Qt build. Do not use externally. We mean it.
+PLUGIN_TYPE = designer
+load(qt_plugin)
+} else {
+# Public example:
+
 #! [2]
+CONFIG      += plugin
 TEMPLATE    = lib
-#! [1] #! [2]
-DESTDIR = $$QT.designer.plugins/designer
+#! [2]
+
+TARGET = $$qtLibraryTarget($$TARGET)
+
+target.path = $$[QT_INSTALL_PLUGINS]/designer
+INSTALLS += target
+
+}
 
 #! [3]
 HEADERS     = analogclock.h \
@@ -17,7 +30,6 @@ OTHER_FILES += analogclock.json
 #! [3]
 
 # install
-target.path = $$[QT_INSTALL_PLUGINS]/designer
 sources.files = $$SOURCES $$HEADERS *.pro
 sources.path = $$[QT_INSTALL_EXAMPLES]/qttools/designer/customwidgetplugin
-INSTALLS += target sources
+INSTALLS += sources
index b66318e..900a05c 100644 (file)
@@ -1,12 +1,25 @@
 #! [0]
-TEMPLATE = lib
+QT      += widgets designer
 #! [0]
-TARGET   = $$qtLibraryTarget($$TARGET)
+
+QTDIR_build {
+# This is only for the Qt build. Do not use externally. We mean it.
+PLUGIN_TYPE = designer
+load(qt_plugin)
+} else {
+# Public example:
+
 #! [1]
+TEMPLATE = lib
 CONFIG  += plugin
-QT      += widgets designer
 #! [1]
-DESTDIR = $$QT.designer.plugins/designer
+
+TARGET = $$qtLibraryTarget($$TARGET)
+
+target.path = $$[QT_INSTALL_PLUGINS]/designer
+INSTALLS += target
+
+}
 
 #! [2]
 HEADERS += tictactoe.h \
@@ -21,7 +34,6 @@ OTHER_FILES += tictactoe.json
 #! [2]
 
 # install
-target.path = $$[QT_INSTALL_PLUGINS]/designer
 sources.files = $$SOURCES $$HEADERS *.pro
 sources.path = $$[QT_INSTALL_EXAMPLES]/qttools/designer/taskmenuextension
-INSTALLS += target sources
+INSTALLS += sources
index 09342db..68f4ca4 100644 (file)
@@ -1,12 +1,24 @@
 #! [0]
-CONFIG      += plugin
 QT          += widgets designer
 #! [0]
+
+QTDIR_build {
+# This is only for the Qt build. Do not use externally. We mean it.
+PLUGIN_TYPE = designer
+load(qt_plugin)
+} else {
+# Public example:
+
 TARGET      = $$qtLibraryTarget($$TARGET)
 #! [1]
+CONFIG     += plugin
 TEMPLATE    = lib
 #! [1]
-DESTDIR = $$QT.designer.plugins/designer
+
+target.path = $$[QT_INSTALL_PLUGINS]/designer
+INSTALLS += target
+
+}
 
 #! [2]
 HEADERS     = worldtimeclock.h \
@@ -16,7 +28,6 @@ SOURCES     = worldtimeclock.cpp \
 #! [2]
 
 # install
-target.path = $$[QT_INSTALL_PLUGINS]/designer
 sources.files = $$SOURCES $$HEADERS *.pro
 sources.path = $$[QT_INSTALL_EXAMPLES]/qttools/designer/worldtimeclockplugin
-INSTALLS += target sources
+INSTALLS += sources
index ebe19e6..a94b671 100644 (file)
@@ -1,7 +1,5 @@
-TEMPLATE    = lib
 TARGET      = qaxwidget
-DESTDIR = $$QT.designer.plugins/designer
-CONFIG     += qaxcontainer qt warn_on plugin
+CONFIG     += qaxcontainer
 QT         += widgets designer-private
 
 include(../plugins.pri)
index a803d94..79d1095 100644 (file)
@@ -1,10 +1,5 @@
 QT += designer
-!build_pass:contains(QT_CONFIG, build_all): CONFIG += release
-DESTDIR = $$QT.designer.plugins/designer
-contains(TEMPLATE, ".*lib"):TARGET = $$qtLibraryTarget($$TARGET)
 
-# install
-target.path = $$[QT_INSTALL_PLUGINS]/designer
-INSTALLS += target
-
-INCLUDEPATH += $$QT.designer.includes
+PLUGIN_TYPE = designer
+CNOFIG += tool_plugin
+load(qt_plugin)
index ad25010..45e6413 100644 (file)
@@ -1,6 +1,4 @@
-TEMPLATE    = lib
 TARGET      = qwebview
-CONFIG     += qt warn_on plugin
 QT         += widgets webkitwidgets
 
 include(../plugins.pri)
index 7882c47..a1687dc 100644 (file)
@@ -1,7 +1,4 @@
-
-TEMPLATE = lib
 QT      += opengl widgets
-CONFIG  += qt warn_on plugin
 TARGET = view3d
 
 include(../../plugins.pri)