aboutsummaryrefslogtreecommitdiffstats
path: root/src/qtcreatorplugin.pri
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2012-02-21 16:52:28 +0100
committerFriedemann Kleint <Friedemann.Kleint@nokia.com>2012-03-02 14:13:49 +0100
commit4e83fb7953fb670abd4de1b685ef0142da241cba (patch)
tree6f3fe42e3fea85b41c8fc6ab43603594e5cfb598 /src/qtcreatorplugin.pri
parent36effe8cb41eb818afc23defad8354f30f731075 (diff)
Port Qt Creator to the new plugin system of Qt 5.
- Add Q_PLUGIN_METADATA for Qt 5, use Q_EXPORT_PLUGIN for Qt 4. - Generate the Json files for Qt 5 from the pluginspec files by using a XSLT sheet. Change-Id: I8653f182ae7d61615971c093df10b84fb06c2172 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Diffstat (limited to 'src/qtcreatorplugin.pri')
-rw-r--r--src/qtcreatorplugin.pri16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/qtcreatorplugin.pri b/src/qtcreatorplugin.pri
index 1e659e6ab8..53ceac018b 100644
--- a/src/qtcreatorplugin.pri
+++ b/src/qtcreatorplugin.pri
@@ -57,6 +57,22 @@ copy2build.name = COPY ${QMAKE_FILE_IN}
copy2build.CONFIG += no_link
QMAKE_EXTRA_COMPILERS += copy2build
+greaterThan(QT_MAJOR_VERSION, 4) {
+# Create a Json file containing the plugin information required by
+# Qt 5's plugin system by running a XSLT sheet on the
+# pluginspec file before moc runs.
+ XMLPATTERNS = $$targetPath($$[QT_INSTALL_BINS]/xmlpatterns)
+
+ pluginspec2json.name = Create Qt 5 plugin json file
+ pluginspec2json.input = PLUGINSPEC
+ pluginspec2json.variable_out = GENERATED_FILES
+ pluginspec2json.output = $${TARGET}.json
+ pluginspec2json.commands = $$XMLPATTERNS -no-format -output $$pluginspec2json.output $$PWD/pluginjsonmetadata.xsl $$PLUGINSPEC
+ pluginspec2json.CONFIG += no_link
+ moc_header.depends += $$pluginspec2json.output
+ QMAKE_EXTRA_COMPILERS += pluginspec2json
+}
+
macx {
!isEmpty(TIGER_COMPAT_MODE) {
QMAKE_LFLAGS_SONAME = -Wl,-install_name,@executable_path/../PlugIns/$${PROVIDER}/