From fc9a648dc03ec4531553bc3d65ae4dba3c5b5980 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Lind?= Date: Mon, 6 Jun 2011 08:45:02 +0200 Subject: [PATCH] Make building of platform plugins indifferent if its out of source This requires some source files to be shipped with the Qt install They are now copied into QT_INSTALL_DATA/platform --- mkspecs/features/qpa/dnd/simple.prf | 5 + mkspecs/features/qpa/egl/context.prf | 9 ++ mkspecs/features/qpa/egl/convenience.prf | 9 ++ mkspecs/features/qpa/egl/xlibintegration.prf | 9 ++ .../features/qpa/fontdatabases/basicunix.prf | 105 ++++++++++++++++++ .../features/qpa/fontdatabases/fontconfig.prf | 12 ++ .../qpa/fontdatabases/genericunix.prf | 9 ++ mkspecs/features/qpa/fontengine_dir.prf | 9 ++ mkspecs/features/qpa/freetype_dir.prf | 8 ++ mkspecs/features/qpa/glx/convenience.prf | 16 +++ mkspecs/features/qpa/harfbuzz_dir.prf | 9 ++ mkspecs/features/qpa/platforms_dir.prf | 7 ++ mkspecs/features/qpa/plugin.prf | 5 + .../qpa/printersupport/genericunix.prf | 6 + .../features/qpa/printersupport/windows.prf | 13 +++ src/gui/text/qfontengine_ft_p.h | 2 +- src/plugins/platforms/cocoa/cocoa.pro | 4 +- src/plugins/platforms/dnd/dnd.pri | 4 - .../eglconvenience/eglconvenience.pri | 7 -- .../eglconvenience/xlibeglintegration.pri | 7 -- src/plugins/platforms/eglfs/eglfs.pro | 2 +- src/plugins/platforms/externalplugin.pri | 29 ----- .../fontdatabases/basicunix/basicunix.pri | 86 -------------- .../fontdatabases/fontconfig/fontconfig.pri | 12 -- .../fontdatabases/genericunix/genericunix.pri | 10 -- .../glxconvenience/glxconvenience.pri | 15 --- .../fontengine_files/fontengine_files.pro | 9 ++ .../install_rules/freetype/freetype.pro | 11 ++ .../install_rules/harfbuzz/harfbuzz.pro | 12 ++ .../platforms/install_rules/install_rules.pro | 7 ++ src/plugins/platforms/minimal/minimal.pro | 2 +- src/plugins/platforms/platforms.pro | 17 +++ .../genericunix/genericunix.pri | 4 - .../printersupport/windows/windows.pri | 7 -- src/plugins/platforms/uikit/uikit.pro | 4 +- .../readback_egl/readback_egl.pri | 4 +- .../readback_glx/readback_glx.pri | 2 +- .../wayland_egl/wayland_egl.pri | 2 +- .../xcomposite_egl/xcomposite_egl.pri | 4 +- .../xcomposite_glx/xcomposite_glx.pri | 2 +- src/plugins/platforms/wayland/wayland.pro | 5 +- src/plugins/platforms/xcb/xcb.pro | 22 ++-- src/plugins/platforms/xlib/xlib.pro | 16 +-- 43 files changed, 316 insertions(+), 223 deletions(-) create mode 100644 mkspecs/features/qpa/dnd/simple.prf create mode 100644 mkspecs/features/qpa/egl/context.prf create mode 100644 mkspecs/features/qpa/egl/convenience.prf create mode 100644 mkspecs/features/qpa/egl/xlibintegration.prf create mode 100644 mkspecs/features/qpa/fontdatabases/basicunix.prf create mode 100644 mkspecs/features/qpa/fontdatabases/fontconfig.prf create mode 100644 mkspecs/features/qpa/fontdatabases/genericunix.prf create mode 100644 mkspecs/features/qpa/fontengine_dir.prf create mode 100644 mkspecs/features/qpa/freetype_dir.prf create mode 100644 mkspecs/features/qpa/glx/convenience.prf create mode 100644 mkspecs/features/qpa/harfbuzz_dir.prf create mode 100644 mkspecs/features/qpa/platforms_dir.prf create mode 100644 mkspecs/features/qpa/plugin.prf create mode 100644 mkspecs/features/qpa/printersupport/genericunix.prf create mode 100644 mkspecs/features/qpa/printersupport/windows.prf delete mode 100644 src/plugins/platforms/dnd/dnd.pri delete mode 100644 src/plugins/platforms/eglconvenience/eglconvenience.pri delete mode 100644 src/plugins/platforms/eglconvenience/xlibeglintegration.pri delete mode 100644 src/plugins/platforms/externalplugin.pri delete mode 100644 src/plugins/platforms/fontdatabases/basicunix/basicunix.pri delete mode 100644 src/plugins/platforms/fontdatabases/fontconfig/fontconfig.pri delete mode 100644 src/plugins/platforms/fontdatabases/genericunix/genericunix.pri delete mode 100644 src/plugins/platforms/glxconvenience/glxconvenience.pri create mode 100644 src/plugins/platforms/install_rules/fontengine_files/fontengine_files.pro create mode 100644 src/plugins/platforms/install_rules/freetype/freetype.pro create mode 100644 src/plugins/platforms/install_rules/harfbuzz/harfbuzz.pro create mode 100644 src/plugins/platforms/install_rules/install_rules.pro delete mode 100644 src/plugins/platforms/printersupport/genericunix/genericunix.pri delete mode 100644 src/plugins/platforms/printersupport/windows/windows.pri diff --git a/mkspecs/features/qpa/dnd/simple.prf b/mkspecs/features/qpa/dnd/simple.prf new file mode 100644 index 0000000000..9333110fae --- /dev/null +++ b/mkspecs/features/qpa/dnd/simple.prf @@ -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 index 0000000000..0689a3e71e --- /dev/null +++ b/mkspecs/features/qpa/egl/context.prf @@ -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 index 0000000000..e1449cb5e5 --- /dev/null +++ b/mkspecs/features/qpa/egl/convenience.prf @@ -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 index 0000000000..ad267f17b7 --- /dev/null +++ b/mkspecs/features/qpa/egl/xlibintegration.prf @@ -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 index 0000000000..d31b89e074 --- /dev/null +++ b/mkspecs/features/qpa/fontdatabases/basicunix.prf @@ -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 index 0000000000..7091aeaf2d --- /dev/null +++ b/mkspecs/features/qpa/fontdatabases/fontconfig.prf @@ -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 index 0000000000..014bdd3726 --- /dev/null +++ b/mkspecs/features/qpa/fontdatabases/genericunix.prf @@ -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 index 0000000000..ac88e03110 --- /dev/null +++ b/mkspecs/features/qpa/fontengine_dir.prf @@ -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 index 0000000000..b3591f2a88 --- /dev/null +++ b/mkspecs/features/qpa/freetype_dir.prf @@ -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 index 0000000000..41ef193a99 --- /dev/null +++ b/mkspecs/features/qpa/glx/convenience.prf @@ -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 index 0000000000..b0a368f031 --- /dev/null +++ b/mkspecs/features/qpa/harfbuzz_dir.prf @@ -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 index 0000000000..edb313c84f --- /dev/null +++ b/mkspecs/features/qpa/platforms_dir.prf @@ -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 index 0000000000..d2ee6a2a55 --- /dev/null +++ b/mkspecs/features/qpa/plugin.prf @@ -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 index 0000000000..c5af646815 --- /dev/null +++ b/mkspecs/features/qpa/printersupport/genericunix.prf @@ -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 index 0000000000..40043259dd --- /dev/null +++ b/mkspecs/features/qpa/printersupport/windows.prf @@ -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 diff --git a/src/gui/text/qfontengine_ft_p.h b/src/gui/text/qfontengine_ft_p.h index 2549fc5ae1..a52fd45df2 100644 --- a/src/gui/text/qfontengine_ft_p.h +++ b/src/gui/text/qfontengine_ft_p.h @@ -51,7 +51,7 @@ // We mean it. // -#include "qfontengine_p.h" +#include "private/qfontengine_p.h" #ifndef QT_NO_FREETYPE diff --git a/src/plugins/platforms/cocoa/cocoa.pro b/src/plugins/platforms/cocoa/cocoa.pro index 117dbe46d9..5a980a8a18 100644 --- a/src/plugins/platforms/cocoa/cocoa.pro +++ b/src/plugins/platforms/cocoa/cocoa.pro @@ -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 index d2a326b499..0000000000 --- a/src/plugins/platforms/dnd/dnd.pri +++ /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 index 322d4e4633..0000000000 --- a/src/plugins/platforms/eglconvenience/eglconvenience.pri +++ /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 index 9404a70373..0000000000 --- a/src/plugins/platforms/eglconvenience/xlibeglintegration.pri +++ /dev/null @@ -1,7 +0,0 @@ -INCLUDEPATH += $$PWD - -HEADERS += \ - $$PWD/qxlibeglintegration.h - -SOURCES += \ - $$PWD/qxlibeglintegration.cpp diff --git a/src/plugins/platforms/eglfs/eglfs.pro b/src/plugins/platforms/eglfs/eglfs.pro index 471cf63dd8..bcf5c6153a 100644 --- a/src/plugins/platforms/eglfs/eglfs.pro +++ b/src/plugins/platforms/eglfs/eglfs.pro @@ -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 index 9b00acb4e9..0000000000 --- a/src/plugins/platforms/externalplugin.pri +++ /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 index da4698df0d..0000000000 --- a/src/plugins/platforms/fontdatabases/basicunix/basicunix.pri +++ /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 index 19c74ed089..0000000000 --- a/src/plugins/platforms/fontdatabases/fontconfig/fontconfig.pri +++ /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 index 1153ab36b7..0000000000 --- a/src/plugins/platforms/fontdatabases/genericunix/genericunix.pri +++ /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 index b4d43a30b5..0000000000 --- a/src/plugins/platforms/glxconvenience/glxconvenience.pri +++ /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 index 0000000000..2cd27da623 --- /dev/null +++ b/src/plugins/platforms/install_rules/fontengine_files/fontengine_files.pro @@ -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 index 0000000000..d9eb6ff304 --- /dev/null +++ b/src/plugins/platforms/install_rules/freetype/freetype.pro @@ -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 index 0000000000..c0dba4a074 --- /dev/null +++ b/src/plugins/platforms/install_rules/harfbuzz/harfbuzz.pro @@ -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 index 0000000000..8b64f8a415 --- /dev/null +++ b/src/plugins/platforms/install_rules/install_rules.pro @@ -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 diff --git a/src/plugins/platforms/minimal/minimal.pro b/src/plugins/platforms/minimal/minimal.pro index d51b6b2ed0..b8c65a3e3b 100644 --- a/src/plugins/platforms/minimal/minimal.pro +++ b/src/plugins/platforms/minimal/minimal.pro @@ -1,5 +1,5 @@ TARGET = qminimal -load(qt_plugin) +load(qpa/plugin) QT = core-private gui-private DESTDIR = $$QT.gui.plugins/platforms diff --git a/src/plugins/platforms/platforms.pro b/src/plugins/platforms/platforms.pro index 9d7ae296a9..681220d4d3 100644 --- a/src/plugins/platforms/platforms.pro +++ b/src/plugins/platforms/platforms.pro @@ -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 index ea9c8f0b5d..0000000000 --- a/src/plugins/platforms/printersupport/genericunix/genericunix.pri +++ /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 index 67d49b22f3..0000000000 --- a/src/plugins/platforms/printersupport/windows/windows.pri +++ /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 diff --git a/src/plugins/platforms/uikit/uikit.pro b/src/plugins/platforms/uikit/uikit.pro index 45a48dc92a..5e3a0e6b7c 100644 --- a/src/plugins/platforms/uikit/uikit.pro +++ b/src/plugins/platforms/uikit/uikit.pro @@ -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 diff --git a/src/plugins/platforms/wayland/gl_integration/readback_egl/readback_egl.pri b/src/plugins/platforms/wayland/gl_integration/readback_egl/readback_egl.pri index 0d8e01b6bb..3325fe8ec9 100644 --- a/src/plugins/platforms/wayland/gl_integration/readback_egl/readback_egl.pri +++ b/src/plugins/platforms/wayland/gl_integration/readback_egl/readback_egl.pri @@ -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 diff --git a/src/plugins/platforms/wayland/gl_integration/readback_glx/readback_glx.pri b/src/plugins/platforms/wayland/gl_integration/readback_glx/readback_glx.pri index f8ea005937..dc84d1c9e9 100644 --- a/src/plugins/platforms/wayland/gl_integration/readback_glx/readback_glx.pri +++ b/src/plugins/platforms/wayland/gl_integration/readback_glx/readback_glx.pri @@ -1,4 +1,4 @@ -include (../../../glxconvenience/glxconvenience.pri) +load(qpa/glx/convenience) HEADERS += \ $$PWD/qwaylandreadbackglxintegration.h \ $$PWD/qwaylandreadbackglxwindow.h \ diff --git a/src/plugins/platforms/wayland/gl_integration/wayland_egl/wayland_egl.pri b/src/plugins/platforms/wayland/gl_integration/wayland_egl/wayland_egl.pri index cd0701150f..6f4edb08a6 100644 --- a/src/plugins/platforms/wayland/gl_integration/wayland_egl/wayland_egl.pri +++ b/src/plugins/platforms/wayland/gl_integration/wayland_egl/wayland_egl.pri @@ -1,4 +1,4 @@ -include (../../../eglconvenience/eglconvenience.pri) +load(qpa/egl/convenience) LIBS += -lwayland-egl -lEGL INCLUDEPATH += $$PWD diff --git a/src/plugins/platforms/wayland/gl_integration/xcomposite_egl/xcomposite_egl.pri b/src/plugins/platforms/wayland/gl_integration/xcomposite_egl/xcomposite_egl.pri index c3533f9ce3..7d2f8ad443 100644 --- a/src/plugins/platforms/wayland/gl_integration/xcomposite_egl/xcomposite_egl.pri +++ b/src/plugins/platforms/wayland/gl_integration/xcomposite_egl/xcomposite_egl.pri @@ -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 diff --git a/src/plugins/platforms/wayland/gl_integration/xcomposite_glx/xcomposite_glx.pri b/src/plugins/platforms/wayland/gl_integration/xcomposite_glx/xcomposite_glx.pri index 43295e91e7..9aae32c41b 100644 --- a/src/plugins/platforms/wayland/gl_integration/xcomposite_glx/xcomposite_glx.pri +++ b/src/plugins/platforms/wayland/gl_integration/xcomposite_glx/xcomposite_glx.pri @@ -1,5 +1,5 @@ include (../xcomposite_share/xcomposite_share.pri) -include (../../../glxconvenience/glxconvenience.pri) +load(qpa/glx/convenience) LIBS += -lXcomposite SOURCES += \ diff --git a/src/plugins/platforms/wayland/wayland.pro b/src/plugins/platforms/wayland/wayland.pro index 5bf751b6e9..b37bfbbb3b 100644 --- a/src/plugins/platforms/wayland/wayland.pro +++ b/src/plugins/platforms/wayland/wayland.pro @@ -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 diff --git a/src/plugins/platforms/xcb/xcb.pro b/src/plugins/platforms/xcb/xcb.pro index b78844a8d4..5d48ff9b50 100644 --- a/src/plugins/platforms/xcb/xcb.pro +++ b/src/plugins/platforms/xcb/xcb.pro @@ -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 diff --git a/src/plugins/platforms/xlib/xlib.pro b/src/plugins/platforms/xlib/xlib.pro index 2cba5513d5..b6d0e0bf27 100644 --- a/src/plugins/platforms/xlib/xlib.pro +++ b/src/plugins/platforms/xlib/xlib.pro @@ -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 } }