Make building of platform plugins indifferent if its out of source
authorJørgen Lind <jorgen.lind@nokia.com>
Mon, 6 Jun 2011 06:45:02 +0000 (08:45 +0200)
committerJørgen Lind <jorgen.lind@nokia.com>
Mon, 6 Jun 2011 12:35:36 +0000 (14:35 +0200)
This requires some source files to be shipped with the Qt install
They are now copied into QT_INSTALL_DATA/platform

43 files changed:
mkspecs/features/qpa/dnd/simple.prf [new file with mode: 0644]
mkspecs/features/qpa/egl/context.prf [new file with mode: 0644]
mkspecs/features/qpa/egl/convenience.prf [new file with mode: 0644]
mkspecs/features/qpa/egl/xlibintegration.prf [new file with mode: 0644]
mkspecs/features/qpa/fontdatabases/basicunix.prf [new file with mode: 0644]
mkspecs/features/qpa/fontdatabases/fontconfig.prf [new file with mode: 0644]
mkspecs/features/qpa/fontdatabases/genericunix.prf [new file with mode: 0644]
mkspecs/features/qpa/fontengine_dir.prf [new file with mode: 0644]
mkspecs/features/qpa/freetype_dir.prf [new file with mode: 0644]
mkspecs/features/qpa/glx/convenience.prf [new file with mode: 0644]
mkspecs/features/qpa/harfbuzz_dir.prf [new file with mode: 0644]
mkspecs/features/qpa/platforms_dir.prf [new file with mode: 0644]
mkspecs/features/qpa/plugin.prf [new file with mode: 0644]
mkspecs/features/qpa/printersupport/genericunix.prf [new file with mode: 0644]
mkspecs/features/qpa/printersupport/windows.prf [new file with mode: 0644]
src/gui/text/qfontengine_ft_p.h
src/plugins/platforms/cocoa/cocoa.pro
src/plugins/platforms/dnd/dnd.pri [deleted file]
src/plugins/platforms/eglconvenience/eglconvenience.pri [deleted file]
src/plugins/platforms/eglconvenience/xlibeglintegration.pri [deleted file]
src/plugins/platforms/eglfs/eglfs.pro
src/plugins/platforms/externalplugin.pri [deleted file]
src/plugins/platforms/fontdatabases/basicunix/basicunix.pri [deleted file]
src/plugins/platforms/fontdatabases/fontconfig/fontconfig.pri [deleted file]
src/plugins/platforms/fontdatabases/genericunix/genericunix.pri [deleted file]
src/plugins/platforms/glxconvenience/glxconvenience.pri [deleted file]
src/plugins/platforms/install_rules/fontengine_files/fontengine_files.pro [new file with mode: 0644]
src/plugins/platforms/install_rules/freetype/freetype.pro [new file with mode: 0644]
src/plugins/platforms/install_rules/harfbuzz/harfbuzz.pro [new file with mode: 0644]
src/plugins/platforms/install_rules/install_rules.pro [new file with mode: 0644]
src/plugins/platforms/minimal/minimal.pro
src/plugins/platforms/platforms.pro
src/plugins/platforms/printersupport/genericunix/genericunix.pri [deleted file]
src/plugins/platforms/printersupport/windows/windows.pri [deleted file]
src/plugins/platforms/uikit/uikit.pro
src/plugins/platforms/wayland/gl_integration/readback_egl/readback_egl.pri
src/plugins/platforms/wayland/gl_integration/readback_glx/readback_glx.pri
src/plugins/platforms/wayland/gl_integration/wayland_egl/wayland_egl.pri
src/plugins/platforms/wayland/gl_integration/xcomposite_egl/xcomposite_egl.pri
src/plugins/platforms/wayland/gl_integration/xcomposite_glx/xcomposite_glx.pri
src/plugins/platforms/wayland/wayland.pro
src/plugins/platforms/xcb/xcb.pro
src/plugins/platforms/xlib/xlib.pro

diff --git a/mkspecs/features/qpa/dnd/simple.prf b/mkspecs/features/qpa/dnd/simple.prf
new file mode 100644 (file)
index 0000000..9333110
--- /dev/null
@@ -0,0 +1,5 @@
+load(qpa/platforms_dir)
+INCLUDEPATH += $$QT_PLATFORMS_DIR/dnd
+HEADERS += $$QT_PLATFORMS_DIR/dnd/qsimpledrag.h
+SOURCES += $$QT_PLATFORMS_DIR/dnd/qsimpledrag.cpp
+QT += gui-private
diff --git a/mkspecs/features/qpa/egl/context.prf b/mkspecs/features/qpa/egl/context.prf
new file mode 100644 (file)
index 0000000..0689a3e
--- /dev/null
@@ -0,0 +1,9 @@
+load(qpa/platforms_dir)
+
+INCLUDEPATH += $$QT_PLATFORMS_DIR/eglconvenience
+
+SOURCES += \
+    $$QT_PLATFORMS_DIR/eglconvenience/qeglplatformcontext.cpp
+
+HEADERS += \
+    $$QT_PLATFORMS_DIR/eglconvenience/qeglplatformcontext.h
diff --git a/mkspecs/features/qpa/egl/convenience.prf b/mkspecs/features/qpa/egl/convenience.prf
new file mode 100644 (file)
index 0000000..e1449cb
--- /dev/null
@@ -0,0 +1,9 @@
+load(qpa/platforms_dir)
+
+INCLUDEPATH += $$QT_PLATFORMS_DIR/eglconvenience
+
+SOURCES += \
+    $$QT_PLATFORMS_DIR/eglconvenience/qeglconvenience.cpp
+
+HEADERS += \
+    $$QT_PLATFORMS_DIR/eglconvenience/qeglconvenience.h
diff --git a/mkspecs/features/qpa/egl/xlibintegration.prf b/mkspecs/features/qpa/egl/xlibintegration.prf
new file mode 100644 (file)
index 0000000..ad267f1
--- /dev/null
@@ -0,0 +1,9 @@
+load(qpa/platforms_dir)
+
+INCLUDEPATH += $$QT_PLATFORMS_DIR/eglconvenience
+
+HEADERS += \
+    $$QT_PLATFORMS_DIR/eglconvenience/qxlibeglintegration.h
+
+SOURCES += \
+    $$QT_PLATFORMS_DIR/eglconvenience/qxlibeglintegration.cpp
diff --git a/mkspecs/features/qpa/fontdatabases/basicunix.prf b/mkspecs/features/qpa/fontdatabases/basicunix.prf
new file mode 100644 (file)
index 0000000..d31b89e
--- /dev/null
@@ -0,0 +1,105 @@
+#### Remove this define
+DEFINES += QT_NO_FONTCONFIG
+
+QT += gui-private core-private
+
+load(qpa/platforms_dir)
+load(qpa/harfbuzz_dir)
+load(qpa/freetype_dir)
+load(qpa/fontengine_dir)
+
+
+HEADERS += \
+        $$QT_PLATFORMS_DIR/fontdatabases/basicunix/qbasicunixfontdatabase.h \
+        $$QT_FONTENGINE_DIR/qfontengine_ft_p.h
+
+SOURCES += \
+        $$QT_PLATFORMS_DIR/fontdatabases/basicunix/qbasicunixfontdatabase.cpp \
+        $$QT_FONTENGINE_DIR/qfontengine_ft.cpp
+
+INCLUDEPATH += $$QT_HARFBUZZ_DIR/src
+
+INCLUDEPATH += $$QT_PLATFORMS_DIR/fontdatabases/basicunix
+
+CONFIG += opentype
+
+contains(QT_CONFIG, freetype) {
+    SOURCES += \
+               $$QT_FREETYPE_DIR/src/base/ftbase.c \
+               $$QT_FREETYPE_DIR/src/base/ftbbox.c \
+               $$QT_FREETYPE_DIR/src/base/ftdebug.c \
+               $$QT_FREETYPE_DIR/src/base/ftglyph.c \
+               $$QT_FREETYPE_DIR/src/base/ftinit.c \
+               $$QT_FREETYPE_DIR/src/base/ftmm.c \
+               $$QT_FREETYPE_DIR/src/base/fttype1.c \
+               $$QT_FREETYPE_DIR/src/base/ftsynth.c \
+               $$QT_FREETYPE_DIR/src/base/ftbitmap.c \
+               $$QT_FREETYPE_DIR/src/bdf/bdf.c \
+               $$QT_FREETYPE_DIR/src/cache/ftcache.c \
+               $$QT_FREETYPE_DIR/src/cff/cff.c \
+               $$QT_FREETYPE_DIR/src/cid/type1cid.c \
+               $$QT_FREETYPE_DIR/src/gzip/ftgzip.c \
+               $$QT_FREETYPE_DIR/src/pcf/pcf.c \
+               $$QT_FREETYPE_DIR/src/pfr/pfr.c \
+               $$QT_FREETYPE_DIR/src/psaux/psaux.c \
+               $$QT_FREETYPE_DIR/src/pshinter/pshinter.c \
+               $$QT_FREETYPE_DIR/src/psnames/psmodule.c \
+               $$QT_FREETYPE_DIR/src/raster/raster.c \
+               $$QT_FREETYPE_DIR/src/sfnt/sfnt.c \
+               $$QT_FREETYPE_DIR/src/smooth/smooth.c \
+               $$QT_FREETYPE_DIR/src/truetype/truetype.c \
+               $$QT_FREETYPE_DIR/src/type1/type1.c \
+               $$QT_FREETYPE_DIR/src/type42/type42.c \
+               $$QT_FREETYPE_DIR/src/winfonts/winfnt.c \
+               $$QT_FREETYPE_DIR/src/lzw/ftlzw.c\
+               $$QT_FREETYPE_DIR/src/otvalid/otvalid.c\
+               $$QT_FREETYPE_DIR/src/otvalid/otvbase.c\
+               $$QT_FREETYPE_DIR/src/otvalid/otvgdef.c\
+               $$QT_FREETYPE_DIR/src/otvalid/otvjstf.c\
+               $$QT_FREETYPE_DIR/src/otvalid/otvcommn.c\
+               $$QT_FREETYPE_DIR/src/otvalid/otvgpos.c\
+               $$QT_FREETYPE_DIR/src/otvalid/otvgsub.c\
+               $$QT_FREETYPE_DIR/src/otvalid/otvmod.c\
+               $$QT_FREETYPE_DIR/src/autofit/afangles.c\
+               $$QT_FREETYPE_DIR/src/autofit/afglobal.c\
+               $$QT_FREETYPE_DIR/src/autofit/aflatin.c\
+               $$QT_FREETYPE_DIR/src/autofit/afmodule.c\
+               $$QT_FREETYPE_DIR/src/autofit/afdummy.c\
+               $$QT_FREETYPE_DIR/src/autofit/afhints.c\
+               $$QT_FREETYPE_DIR/src/autofit/afloader.c\
+               $$QT_FREETYPE_DIR/src/autofit/autofit.c
+
+               symbian {
+                   SOURCES += \
+                              $$QT_FREETYPE_DIR/src/base/ftsystem.c
+               } else {
+                   SOURCES += \
+                              $$QT_FREETYPE_DIR/builds/unix/ftsystem.c
+                  INCLUDEPATH += \
+                              $$QT_FREETYPE_DIR/builds/unix
+               }
+
+               INCLUDEPATH += \
+                   $$QT_FREETYPE_DIR/src \
+                   $$QT_FREETYPE_DIR/include
+
+               DEFINES += FT2_BUILD_LIBRARY
+               contains(QT_CONFIG, system-zlib) {
+                    DEFINES += FT_CONFIG_OPTION_SYSTEM_ZLIB
+               }
+
+    } else:contains(QT_CONFIG, system-freetype) {
+        # pull in the proper freetype2 include directory
+        #include($$QT_SOURCE_TREE/config.tests/unix/freetype/freetype.pri)
+        !cross_compile {
+            TRY_INCLUDEPATHS = /include /usr/include $$QMAKE_INCDIR $$QMAKE_INCDIR_X11 $$INCLUDEPATH
+            # LSB doesn't allow using headers from /include or /usr/include
+            linux-lsb-g++:TRY_INCLUDEPATHS = $$QMAKE_INCDIR $$QMAKE_INCDIR_X11 $$INCLUDEPATH
+            for(p, TRY_INCLUDEPATHS) {
+                p = $$join(p, "", "", "/freetype2")
+                exists($$p):INCLUDEPATH *= $$p
+            }
+        }
+        LIBS_PRIVATE += -lfreetype
+    }
+
diff --git a/mkspecs/features/qpa/fontdatabases/fontconfig.prf b/mkspecs/features/qpa/fontdatabases/fontconfig.prf
new file mode 100644 (file)
index 0000000..7091aea
--- /dev/null
@@ -0,0 +1,12 @@
+load(qpa/fontdatabases/basicunix)
+
+HEADERS += \
+        $$QT_PLATFORMS_DIR/fontdatabases/fontconfig/qfontconfigdatabase.h
+
+SOURCES += \
+        $$QT_PLATFORMS_DIR/fontdatabases/fontconfig/qfontconfigdatabase.cpp
+
+INCLUDEPATH += $$QT_PLATFORMS_DIR/fontdatabases/fontconfig
+LIBS_PRIVATE += -lfontconfig
+
+
diff --git a/mkspecs/features/qpa/fontdatabases/genericunix.prf b/mkspecs/features/qpa/fontdatabases/genericunix.prf
new file mode 100644 (file)
index 0000000..014bdd3
--- /dev/null
@@ -0,0 +1,9 @@
+contains(QT_CONFIG, fontconfig) {
+    load(qpa/fontdatabases/fontconfig)
+    DEFINES += Q_FONTCONFIGDATABASE
+} else {
+    load(qpa/fontdatabases/basicunix.prf)
+}
+
+INCLUDEPATH += $$QT_PLATFORMS_DIR/fontdatabases/genericunix
+HEADERS += $$QT_PLATFORMS_DIR/fontdatabases/genericunix/qgenericunixfontdatabase.h
diff --git a/mkspecs/features/qpa/fontengine_dir.prf b/mkspecs/features/qpa/fontengine_dir.prf
new file mode 100644 (file)
index 0000000..ac88e03
--- /dev/null
@@ -0,0 +1,9 @@
+load(qpa/platforms_dir)
+
+QT_FONTENGINE_DIR = ""
+
+isEmpty(QT_SOURCE_TREE) {
+    QT_FONTENGINE_DIR = $$QT_PLATFORMS_DIR/fontdatabases/fontengines
+} else {
+    QT_FONTENGINE_DIR = $$QT_SOURCE_TREE/src/gui/text
+}
diff --git a/mkspecs/features/qpa/freetype_dir.prf b/mkspecs/features/qpa/freetype_dir.prf
new file mode 100644 (file)
index 0000000..b3591f2
--- /dev/null
@@ -0,0 +1,8 @@
+load(qpa/platforms_dir)
+
+QT_FREETYPE_DIR = ""
+isEmpty(QT_SOURCE_TREE) {
+    QT_FREETYPE_DIR = $$QT_PLATFORMS_DIR/fontdatabases/freetype
+} else {
+    QT_FREETYPE_DIR = $$QT_SOURCE_TREE/src/3rdparty/freetype
+}
diff --git a/mkspecs/features/qpa/glx/convenience.prf b/mkspecs/features/qpa/glx/convenience.prf
new file mode 100644 (file)
index 0000000..41ef193
--- /dev/null
@@ -0,0 +1,16 @@
+load(qpa/platforms_dir)
+INCLUDEPATH += $$QT_PLATFORMS_DIR/glxconvenience
+
+HEADERS += \
+    $$QT_PLATFORMS_DIR/glxconvenience/qglxconvenience.h
+
+SOURCES += \
+    $$QT_PLATFORMS_DIR/glxconvenience/qglxconvenience.cpp
+
+CONFIG += xrender
+
+xrender {
+       LIBS += -lXrender
+} else {
+       DEFINES += QT_NO_XRENDER
+}
diff --git a/mkspecs/features/qpa/harfbuzz_dir.prf b/mkspecs/features/qpa/harfbuzz_dir.prf
new file mode 100644 (file)
index 0000000..b0a368f
--- /dev/null
@@ -0,0 +1,9 @@
+load(qpa/platforms_dir)
+
+QT_HARFBUZZ_DIR = ""
+isEmpty(QT_SOURCE_TREE) {
+    QT_HARFBUZZ_DIR = $$QT_PLATFORMS_DIR/fontdatabases/harfbuzz
+} else {
+    QT_HARFBUZZ_DIR = $$QT_SOURCE_TREE/src/3rdparty/harfbuzz
+}
+
diff --git a/mkspecs/features/qpa/platforms_dir.prf b/mkspecs/features/qpa/platforms_dir.prf
new file mode 100644 (file)
index 0000000..edb313c
--- /dev/null
@@ -0,0 +1,7 @@
+QT_PLATFORMS_DIR = ""
+
+isEmpty(QT_SOURCE_TREE) {
+    QT_PLATFORMS_DIR = $$[QT_INSTALL_DATA]/platforms
+} else {
+    QT_PLATFORMS_DIR = $$QT_SOURCE_TREE/src/plugins/platforms
+}
diff --git a/mkspecs/features/qpa/plugin.prf b/mkspecs/features/qpa/plugin.prf
new file mode 100644 (file)
index 0000000..d2ee6a2
--- /dev/null
@@ -0,0 +1,5 @@
+TEMPLATE = lib
+
+CONFIG += qt plugin
+
+TARGET = $$qtLibraryTarget($$TARGET)
diff --git a/mkspecs/features/qpa/printersupport/genericunix.prf b/mkspecs/features/qpa/printersupport/genericunix.prf
new file mode 100644 (file)
index 0000000..c5af646
--- /dev/null
@@ -0,0 +1,6 @@
+load(qpa/platforms_dir)
+
+INCLUDEPATH += $$QT_PLATFORMS_DIR/printersupport/genericunix
+HEADERS += $$QT_PLATFORMS_DIR/printersupport/genericunix/qgenericunixprintersupport.h
+SOURCES += $$QT_PLATFORMS_DIR/printersupport/genericunix/qgenericunixprintersupport.cpp
+QT += gui-private
diff --git a/mkspecs/features/qpa/printersupport/windows.prf b/mkspecs/features/qpa/printersupport/windows.prf
new file mode 100644 (file)
index 0000000..4004325
--- /dev/null
@@ -0,0 +1,13 @@
+load(qpa/platforms_dir)
+load(qpa/harfbuzz_dir)
+
+INCLUDEPATH += $$QT_PLATFORMS_DIR/printersupport/windows
+INCLUDEPATH += $$QT_HARFBUZZ_DIR/src
+
+HEADERS += \
+    $$QT_PLATFORMS_DIR/printersupport/windows/qwindowsprintersupport.h \
+    $$QT_PLATFORMS_DIR/printersupport/windows/qprintengine_win_p.h
+SOURCES += \
+    $$QT_PLATFORMS_DIR/printersupport/windows/qwindowsprintersupport.cpp \
+    $$QT_PLATFORMS_DIR/printersupport/windows/qprintengine_win.cpp
+QT += core-private widgets-private
index 2549fc5..a52fd45 100644 (file)
@@ -51,7 +51,7 @@
 // We mean it.
 //
 
-#include "qfontengine_p.h"
+#include "private/qfontengine_p.h"
 
 #ifndef QT_NO_FREETYPE
 
index 117dbe4..5a980a8 100644 (file)
@@ -1,5 +1,5 @@
 TARGET = qcocoa
-load(qt_plugin)
+load(qpa/plugin)
 DESTDIR = $$QT.gui.plugins/platforms
 
 OBJECTIVE_SOURCES = main.mm \
@@ -32,6 +32,6 @@ LIBS += -framework cocoa
 
 QT += core-private gui-private
 
-include(../fontdatabases/basicunix/basicunix.pri)
+load(qpa/fontdatabases/basicunix)
 target.path += $$[QT_INSTALL_PLUGINS]/platforms
 INSTALLS += target
diff --git a/src/plugins/platforms/dnd/dnd.pri b/src/plugins/platforms/dnd/dnd.pri
deleted file mode 100644 (file)
index d2a326b..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-INCLUDEPATH += $$PWD
-HEADERS += $$PWD/qsimpledrag.h
-SOURCES += $$PWD/qsimpledrag.cpp
-QT += gui-private
diff --git a/src/plugins/platforms/eglconvenience/eglconvenience.pri b/src/plugins/platforms/eglconvenience/eglconvenience.pri
deleted file mode 100644 (file)
index 322d4e4..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-INCLUDEPATH += $$PWD
-
-SOURCES += \
-    $$PWD/qeglconvenience.cpp
-
-HEADERS += \
-    $$PWD/qeglconvenience.h
diff --git a/src/plugins/platforms/eglconvenience/xlibeglintegration.pri b/src/plugins/platforms/eglconvenience/xlibeglintegration.pri
deleted file mode 100644 (file)
index 9404a70..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-INCLUDEPATH += $$PWD
-
-HEADERS += \
-    $$PWD/qxlibeglintegration.h
-
-SOURCES += \
-    $$PWD/qxlibeglintegration.cpp
index 471cf63..bcf5c61 100644 (file)
@@ -25,7 +25,7 @@ HEADERS =   qeglfsintegration.h \
             qeglfswindowsurface.h \
             qeglfsscreen.h
 
-include(../fontdatabases/genericunix/genericunix.pri)
+load(qpa/fontdatabases/genericunix)
 
 target.path += $$[QT_INSTALL_PLUGINS]/platforms
 INSTALLS += target
diff --git a/src/plugins/platforms/externalplugin.pri b/src/plugins/platforms/externalplugin.pri
deleted file mode 100644 (file)
index 9b00acb..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# Lighthouse now has preliminarily support for building and
-# loading platform plugins from outside the Qt source/build
-# tree.
-#
-# 1) Building external plugins:
-#    Set QTDIR to the Qt build directory, copy this file to
-#    the plugin source repository and include it at the top
-#    of the plugin's pro file. Use QT_SOURCE_TREE if you
-#    want to pull in source code from Qt:
-#
-#    include($$QT_SOURCE_TREE/src/plugins/platforms/fontdatabases/genericunix/genericunix.pri)
-#
-# 2) Loading external plugins:
-#    Specify the path to the directory containing the
-#    plugin on the command line, in addition to the
-#    platform name.
-#
-#    ./wiggly -platformPluginPath /path/to/myPlugin -platform gullfaksA
-#
-
-!exists($$(QTDIR)/.qmake.cache) {
-    error("Please set QTDIR to the Qt build directory")
-}
-
-QT_SOURCE_TREE = $$fromfile($$(QTDIR)/.qmake.cache,QT_SOURCE_TREE)
-QT_BUILD_TREE = $$fromfile($$(QTDIR)/.qmake.cache,QT_BUILD_TREE)
-
-load(qt_plugin)
diff --git a/src/plugins/platforms/fontdatabases/basicunix/basicunix.pri b/src/plugins/platforms/fontdatabases/basicunix/basicunix.pri
deleted file mode 100644 (file)
index da4698d..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-DEFINES += QT_NO_FONTCONFIG
-HEADERS += \
-        $$QT_SOURCE_TREE/src/plugins/platforms/fontdatabases/basicunix/qbasicunixfontdatabase.h \
-        $$QT_SOURCE_TREE/src/gui/text/qfontengine_ft_p.h
-
-SOURCES += \
-        $$QT_SOURCE_TREE/src/plugins/platforms/fontdatabases/basicunix/qbasicunixfontdatabase.cpp \
-        $$QT_SOURCE_TREE/src/gui/text/qfontengine_ft.cpp
-
-INCLUDEPATH += $$QT_SOURCE_TREE/src/3rdparty/harfbuzz/src
-
-INCLUDEPATH += $$QT_SOURCE_TREE/src/plugins/platforms/fontdatabases/basicunix
-
-CONFIG += opentype
-
-contains(QT_CONFIG, freetype) {
-    SOURCES += \
-               $$QT_SOURCE_TREE/src/3rdparty/freetype/src/base/ftbase.c \
-               $$QT_SOURCE_TREE/src/3rdparty/freetype/src/base/ftbbox.c \
-               $$QT_SOURCE_TREE/src/3rdparty/freetype/src/base/ftdebug.c \
-               $$QT_SOURCE_TREE/src/3rdparty/freetype/src/base/ftglyph.c \
-               $$QT_SOURCE_TREE/src/3rdparty/freetype/src/base/ftinit.c \
-               $$QT_SOURCE_TREE/src/3rdparty/freetype/src/base/ftmm.c \
-               $$QT_SOURCE_TREE/src/3rdparty/freetype/src/base/fttype1.c \
-               $$QT_SOURCE_TREE/src/3rdparty/freetype/src/base/ftsynth.c \
-               $$QT_SOURCE_TREE/src/3rdparty/freetype/src/base/ftbitmap.c \
-               $$QT_SOURCE_TREE/src/3rdparty/freetype/src/bdf/bdf.c \
-               $$QT_SOURCE_TREE/src/3rdparty/freetype/src/cache/ftcache.c \
-               $$QT_SOURCE_TREE/src/3rdparty/freetype/src/cff/cff.c \
-               $$QT_SOURCE_TREE/src/3rdparty/freetype/src/cid/type1cid.c \
-               $$QT_SOURCE_TREE/src/3rdparty/freetype/src/gzip/ftgzip.c \
-               $$QT_SOURCE_TREE/src/3rdparty/freetype/src/pcf/pcf.c \
-               $$QT_SOURCE_TREE/src/3rdparty/freetype/src/pfr/pfr.c \
-               $$QT_SOURCE_TREE/src/3rdparty/freetype/src/psaux/psaux.c \
-               $$QT_SOURCE_TREE/src/3rdparty/freetype/src/pshinter/pshinter.c \
-               $$QT_SOURCE_TREE/src/3rdparty/freetype/src/psnames/psmodule.c \
-               $$QT_SOURCE_TREE/src/3rdparty/freetype/src/raster/raster.c \
-               $$QT_SOURCE_TREE/src/3rdparty/freetype/src/sfnt/sfnt.c \
-               $$QT_SOURCE_TREE/src/3rdparty/freetype/src/smooth/smooth.c \
-               $$QT_SOURCE_TREE/src/3rdparty/freetype/src/truetype/truetype.c \
-               $$QT_SOURCE_TREE/src/3rdparty/freetype/src/type1/type1.c \
-               $$QT_SOURCE_TREE/src/3rdparty/freetype/src/type42/type42.c \
-               $$QT_SOURCE_TREE/src/3rdparty/freetype/src/winfonts/winfnt.c \
-               $$QT_SOURCE_TREE/src/3rdparty/freetype/src/lzw/ftlzw.c\
-               $$QT_SOURCE_TREE/src/3rdparty/freetype/src/otvalid/otvalid.c\
-               $$QT_SOURCE_TREE/src/3rdparty/freetype/src/otvalid/otvbase.c\
-               $$QT_SOURCE_TREE/src/3rdparty/freetype/src/otvalid/otvgdef.c\
-               $$QT_SOURCE_TREE/src/3rdparty/freetype/src/otvalid/otvjstf.c\
-               $$QT_SOURCE_TREE/src/3rdparty/freetype/src/otvalid/otvcommn.c\
-               $$QT_SOURCE_TREE/src/3rdparty/freetype/src/otvalid/otvgpos.c\
-               $$QT_SOURCE_TREE/src/3rdparty/freetype/src/otvalid/otvgsub.c\
-               $$QT_SOURCE_TREE/src/3rdparty/freetype/src/otvalid/otvmod.c\
-               $$QT_SOURCE_TREE/src/3rdparty/freetype/src/autofit/afangles.c\
-               $$QT_SOURCE_TREE/src/3rdparty/freetype/src/autofit/afglobal.c\
-               $$QT_SOURCE_TREE/src/3rdparty/freetype/src/autofit/aflatin.c\
-               $$QT_SOURCE_TREE/src/3rdparty/freetype/src/autofit/afmodule.c\
-               $$QT_SOURCE_TREE/src/3rdparty/freetype/src/autofit/afdummy.c\
-               $$QT_SOURCE_TREE/src/3rdparty/freetype/src/autofit/afhints.c\
-               $$QT_SOURCE_TREE/src/3rdparty/freetype/src/autofit/afloader.c\
-               $$QT_SOURCE_TREE/src/3rdparty/freetype/src/autofit/autofit.c
-
-               symbian {
-                   SOURCES += \
-                              $$QT_SOURCE_TREE/src/3rdparty/freetype/src/base/ftsystem.c
-               } else {
-                   SOURCES += \
-                              $$QT_SOURCE_TREE/src/3rdparty/freetype/builds/unix/ftsystem.c
-                  INCLUDEPATH += \
-                              $$QT_SOURCE_TREE/src/3rdparty/freetype/builds/unix
-               }
-
-               INCLUDEPATH += \
-                   $$QT_SOURCE_TREE/src/3rdparty/freetype/src \
-                   $$QT_SOURCE_TREE/src/3rdparty/freetype/include
-
-               DEFINES += FT2_BUILD_LIBRARY
-               contains(QT_CONFIG, system-zlib) {
-                    DEFINES += FT_CONFIG_OPTION_SYSTEM_ZLIB
-               }
-
-    } else:contains(QT_CONFIG, system-freetype) {
-        # pull in the proper freetype2 include directory
-        include($$QT_SOURCE_TREE/config.tests/unix/freetype/freetype.pri)
-        LIBS_PRIVATE += -lfreetype
-    }
-
diff --git a/src/plugins/platforms/fontdatabases/fontconfig/fontconfig.pri b/src/plugins/platforms/fontdatabases/fontconfig/fontconfig.pri
deleted file mode 100644 (file)
index 19c74ed..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-include(../basicunix/basicunix.pri)
-
-HEADERS += \
-        $$QT_SOURCE_TREE/src/plugins/platforms/fontdatabases/fontconfig/qfontconfigdatabase.h
-
-SOURCES += \
-        $$QT_SOURCE_TREE/src/plugins/platforms/fontdatabases/fontconfig/qfontconfigdatabase.cpp
-
-INCLUDEPATH += $$QT_SOURCE_TREE/src/plugins/platforms/fontdatabases/fontconfig
-LIBS_PRIVATE += -lfontconfig
-
-
diff --git a/src/plugins/platforms/fontdatabases/genericunix/genericunix.pri b/src/plugins/platforms/fontdatabases/genericunix/genericunix.pri
deleted file mode 100644 (file)
index 1153ab3..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-contains(QT_CONFIG, fontconfig) {
-    include(../fontconfig/fontconfig.pri)
-    DEFINES += Q_FONTCONFIGDATABASE
-} else {
-    include(../basicunix/basicunix.pri)
-}
-
-INCLUDEPATH += $$PWD
-HEADERS += \
-           $$PWD/qgenericunixfontdatabase.h
diff --git a/src/plugins/platforms/glxconvenience/glxconvenience.pri b/src/plugins/platforms/glxconvenience/glxconvenience.pri
deleted file mode 100644 (file)
index b4d43a3..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-INCLUDEPATH += $$PWD
-
-HEADERS += \
-    $$PWD/qglxconvenience.h
-
-SOURCES += \
-    $$PWD/qglxconvenience.cpp
-
-CONFIG += xrender
-
-xrender {
-       LIBS += -lXrender
-} else {
-       DEFINES += QT_NO_XRENDER
-}
diff --git a/src/plugins/platforms/install_rules/fontengine_files/fontengine_files.pro b/src/plugins/platforms/install_rules/fontengine_files/fontengine_files.pro
new file mode 100644 (file)
index 0000000..2cd27da
--- /dev/null
@@ -0,0 +1,9 @@
+TEMPLATE = subdirs
+
+FILES += \
+    $$QT_SOURCE_TREE/src/gui/text/qfontengine_ft_p.h \
+    $$QT_SOURCE_TREE/src/gui/text/qfontengine_ft.cpp
+
+sources.files = $$FILES
+sources.path = $$[QT_INSTALL_DATA]/platforms/fontdatabases/fontengines
+INSTALLS = sources
diff --git a/src/plugins/platforms/install_rules/freetype/freetype.pro b/src/plugins/platforms/install_rules/freetype/freetype.pro
new file mode 100644 (file)
index 0000000..d9eb6ff
--- /dev/null
@@ -0,0 +1,11 @@
+TEMPLATE = subdirs
+
+SRCDIR += \
+    $$QT_SOURCE_TREE/src/3rdparty/freetype/src
+
+INCDIR += \
+    $$QT_SOURCE_TREE/src/3rdparty/freetype/include
+
+sources.files = $$SRCDIR $$INCDIR
+sources.path = $$[QT_INSTALL_DATA]/platforms/fontdatabases/freetype
+INSTALLS = sources
diff --git a/src/plugins/platforms/install_rules/harfbuzz/harfbuzz.pro b/src/plugins/platforms/install_rules/harfbuzz/harfbuzz.pro
new file mode 100644 (file)
index 0000000..c0dba4a
--- /dev/null
@@ -0,0 +1,12 @@
+#This file makes sure that harbuzz gets installed, 
+#so that plugins can be compiled out of source
+TEMPLATE = subdirs
+
+
+SRCDIR += \
+    $$QT_SOURCE_TREE/src/3rdparty/harfbuzz/src
+
+sources.files = $$SRCDIR
+sources.path = $$[QT_INSTALL_DATA]/platforms/fontdatabases/harfbuzz
+INSTALLS = sources
+
diff --git a/src/plugins/platforms/install_rules/install_rules.pro b/src/plugins/platforms/install_rules/install_rules.pro
new file mode 100644 (file)
index 0000000..8b64f8a
--- /dev/null
@@ -0,0 +1,7 @@
+# This is so that additional sources are installed
+# in the QT_INSTALL_DATA directory
+TEMPLATE = subdirs
+
+SUBDIRS += harfbuzz
+SUBDIRS += freetype
+SUBDIRS += fontengine_files
index d51b6b2..b8c65a3 100644 (file)
@@ -1,5 +1,5 @@
 TARGET = qminimal
-load(qt_plugin)
+load(qpa/plugin)
 
 QT = core-private gui-private
 DESTDIR = $$QT.gui.plugins/platforms
index 9d7ae29..681220d 100644 (file)
@@ -1,5 +1,22 @@
 TEMPLATE = subdirs
 
+#out of source tree plugin setup start
+SUBDIRS += install_rules
+SRCDIRS = \
+    dnd \
+    eglconvenience \
+    fb_base \
+    fontdatabases \
+    glxconvenience \
+    printersupport \
+    wayland
+
+srcdirs.files = $$SRCDIRS
+srcdirs.path = $$[QT_INSTALL_DATA]/platforms
+
+INSTALLS = srcdirs
+#out of source tree plugin setup end
+
 SUBDIRS += minimal
 
 contains(QT_CONFIG, wayland) {
diff --git a/src/plugins/platforms/printersupport/genericunix/genericunix.pri b/src/plugins/platforms/printersupport/genericunix/genericunix.pri
deleted file mode 100644 (file)
index ea9c8f0..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-INCLUDEPATH += $$PWD
-HEADERS += $$PWD/qgenericunixprintersupport.h
-SOURCES += $$PWD/qgenericunixprintersupport.cpp
-QT += gui-private
diff --git a/src/plugins/platforms/printersupport/windows/windows.pri b/src/plugins/platforms/printersupport/windows/windows.pri
deleted file mode 100644 (file)
index 67d49b2..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-INCLUDEPATH += $$PWD $$QT_SOURCE_TREE/src/3rdparty/harfbuzz/src
-
-HEADERS += $$PWD/qwindowsprintersupport.h \
-    $$PWD/qprintengine_win_p.h
-SOURCES += $$PWD/qwindowsprintersupport.cpp \
-    $$PWD/qprintengine_win.cpp
-QT += core-private widgets-private
index 45a48dc..5e3a0e6 100644 (file)
@@ -1,5 +1,5 @@
 TARGET = quikit
-load(qt_plugin)
+load(qpa/plugin)
 QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/platforms
 
 QT += opengl
@@ -22,6 +22,6 @@ HEADERS = quikitsoftwareinputhandler.h
 #add libz for freetype.
 LIBS += -lz
 
-#include(../fontdatabases/basicunix/basicunix.pri)
+#load(qpa/fontdatabases/basicunix)
 target.path += $$[QT_INSTALL_PLUGINS]/platforms
 INSTALLS += target
index 0d8e01b..3325fe8 100644 (file)
@@ -1,14 +1,12 @@
-
 LIBS += -lX11 -lXext -lEGL
 
+load(qpa/egl/convenience)
 HEADERS += \
     $$PWD/qwaylandreadbackeglintegration.h \
     $$PWD/qwaylandreadbackeglcontext.h \
     $$PWD/qwaylandreadbackeglwindow.h \
-    $$PWD/../../../eglconvenience/qeglconvenience.h
 
 SOURCES += \
     $$PWD/qwaylandreadbackeglintegration.cpp \
     $$PWD/qwaylandreadbackeglwindow.cpp \
     $$PWD/qwaylandreadbackeglcontext.cpp \
-    $$PWD/../../../eglconvenience/qeglconvenience.cpp
index f8ea005..dc84d1c 100644 (file)
@@ -1,4 +1,4 @@
-include (../../../glxconvenience/glxconvenience.pri)
+load(qpa/glx/convenience)
 HEADERS += \
     $$PWD/qwaylandreadbackglxintegration.h \
     $$PWD/qwaylandreadbackglxwindow.h \
index c3533f9..7d2f8ad 100644 (file)
@@ -1,6 +1,6 @@
 include (../xcomposite_share/xcomposite_share.pri)
-include (../../../eglconvenience/eglconvenience.pri)
-include (../../../eglconvenience/xlibeglintegration.pri)
+load(qpa/egl/convenience)
+load(qpa/egl/xlibintegration)
 
 LIBS += -lXcomposite -lEGL
 
index 43295e9..9aae32c 100644 (file)
@@ -1,5 +1,5 @@
 include (../xcomposite_share/xcomposite_share.pri)
-include (../../../glxconvenience/glxconvenience.pri)
+load(qpa/glx/convenience)
 
 LIBS += -lXcomposite
 SOURCES += \
index 5bf751b..b37bfbb 100644 (file)
@@ -1,5 +1,5 @@
 TARGET = qwayland
-load(qt_plugin)
+load(qpa/plugin)
 
 QT+=gui-private core-private opengl-private
 
@@ -45,9 +45,10 @@ QT += core-private
 QT += widgets-private
 
 include ($$PWD/gl_integration/gl_integration.pri)
+
 include ($$PWD/windowmanager_integration/windowmanager_integration.pri)
 
-include (../fontdatabases/genericunix/genericunix.pri)
+load(qpa/fontdatabases/genericunix)
 
 target.path += $$[QT_INSTALL_PLUGINS]/platforms
 INSTALLS += target
index b78844a..5d48ff9 100644 (file)
@@ -1,6 +1,6 @@
 TARGET = xcb
 
-load(qt_plugin)
+load(qpa/plugin)
 QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/platforms
 
 QT += core-private gui-private
@@ -50,20 +50,14 @@ contains(QT_CONFIG, opengl) {
 
         contains(QT_CONFIG, opengles2) {
             DEFINES += XCB_USE_EGL
-            HEADERS += \
-                ../eglconvenience/qeglplatformcontext.h \
-                ../eglconvenience/qeglconvenience.h \
-                ../eglconvenience/qxlibeglintegration.h
-
-            SOURCES += \
-                ../eglconvenience/qeglplatformcontext.cpp \
-                ../eglconvenience/qeglconvenience.cpp \
-                ../eglconvenience/qxlibeglintegration.cpp
+            load(qpa/egl/convenience)
+            load(qpa/egl/context)
+            load(qpa/egl/xlibintegration)
 
             LIBS += -lEGL
         } else {
             DEFINES += XCB_USE_GLX
-            include (../glxconvenience/glxconvenience.pri)
+            load(qpa/glx/convenience)
             HEADERS += qglxintegration.h
             SOURCES += qglxintegration.cpp
         }
@@ -76,9 +70,9 @@ DEFINES += $$QMAKE_DEFINES_XCB
 LIBS += $$QMAKE_LIBS_XCB
 QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_XCB
 
-include (../fontdatabases/genericunix/genericunix.pri)
-include (../printersupport/genericunix/genericunix.pri)
-include (../dnd/dnd.pri)
+load(qpa/fontdatabases/genericunix)
+load(qpa/printersupport/genericunix)
+load(qpa/dnd/simple)
 
 target.path += $$[QT_INSTALL_PLUGINS]/platforms
 INSTALLS += target
index 2cba551..b6d0e0b 100644 (file)
@@ -1,6 +1,6 @@
 TARGET = qxlib
 
-load(qt_plugin)
+load(qpa/plugin)
 DESTDIR = $$QT.gui.plugins/platforms
 
 QT += core-private gui-private opengl-private
@@ -43,19 +43,13 @@ include (../fontdatabases/genericunix/genericunix.pri)
 contains(QT_CONFIG, opengl) {
     QT += opengl
     !contains(QT_CONFIG, opengles2) {
-        include (../glxconvenience/glxconvenience.pri)
+        load(qpa/glx/convenience)
         HEADERS += qglxintegration.h
         SOURCES += qglxintegration.cpp
     } else { # There is no easy way to detect if we'r suppose to use glx or not
-        HEADERS += \
-            ../eglconvenience/qeglplatformcontext.h \
-            ../eglconvenience/qeglconvenience.h \
-            ../eglconvenience/qxlibeglintegration.h
-
-        SOURCES += \
-            ../eglconvenience/qeglplatformcontext.cpp \
-            ../eglconvenience/qeglconvenience.cpp \
-            ../eglconvenience/qxlibeglintegration.cpp
+        load(qpa/egl/context)
+        load(qpa/egl/convenience)
+        load(qpa/egl/xlibintegration)
         LIBS += -lEGL
     }
 }