summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2016-09-30 20:53:53 +0200
committerOswald Buddenhagen <oswald.buddenhagen@qt.io>2016-10-15 18:45:10 +0000
commit9a088e78690a3052f9c2d7e388e37957c2470ab1 (patch)
treec49c2c62ac517ad28265257797b195275b7a9cee /src
parent81755e96230753fc70cecf3c6be28237015cdf9b (diff)
use helper libs via QMAKE_USE
for that, qt_help_lib.prf gains the ability to write "external module pri" files that contain suitable information for QMAKE_USE. these files have a bunch of limitations: - they are not installed, because a) they are not relocatable and b) the helper libs' headers are not installed, either - it won't work with qmake -r, which is ok, as qt5 does not build with qmake -r anyway - deps are not transitive, neither at build nor at use time the freetype, harfbuzz-ng, pcre, and png helper libs have been adjusted accordingly, and their uses replaced with QMAKE_USE instances. this also allowed inlining the now trivial {harfbuzz,pcrc,png}_dependency.pri files. freetype_dependency.pri remains due to its funkiness. Change-Id: I16890eecb122e34ec49f3d3e68380d1ea71a198a Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/3rdparty/freetype/freetype.pro8
-rw-r--r--src/3rdparty/freetype_dependency.pri3
-rw-r--r--src/3rdparty/harfbuzz-ng/harfbuzz-ng.pro6
-rw-r--r--src/3rdparty/harfbuzz_dependency.pri6
-rw-r--r--src/3rdparty/libpng/libpng.pro4
-rw-r--r--src/3rdparty/pcre/pcre.pro4
-rw-r--r--src/3rdparty/pcre_dependency.pri7
-rw-r--r--src/3rdparty/png_dependency.pri6
-rw-r--r--src/angle/src/libEGL/libEGL.pro3
-rw-r--r--src/corelib/tools/tools.pri2
-rw-r--r--src/gui/image/image.pri2
-rw-r--r--src/gui/text/text.pri2
-rw-r--r--src/plugins/platforms/xcb/gl_integrations/gl_integrations_plugin_base.pri5
-rw-r--r--src/plugins/platforms/xcb/xcb-static/xcb-static.pro6
-rw-r--r--src/plugins/platforms/xcb/xcb_qpa_lib.pro5
15 files changed, 24 insertions, 45 deletions
diff --git a/src/3rdparty/freetype/freetype.pro b/src/3rdparty/freetype/freetype.pro
index 6d630d4190..5b1eb92e32 100644
--- a/src/3rdparty/freetype/freetype.pro
+++ b/src/3rdparty/freetype/freetype.pro
@@ -6,6 +6,8 @@ CONFIG += \
exceptions_off rtti_off warn_off \
installed
+MODULE_INCLUDEPATH += $$PWD/include
+
load(qt_helper_lib)
SOURCES += \
@@ -61,16 +63,12 @@ win32 {
INCLUDEPATH += $$PWD/builds/unix
}
-INCLUDEPATH += $$PWD/include
-
DEFINES += FT2_BUILD_LIBRARY
DEFINES += FT_CONFIG_OPTION_SYSTEM_ZLIB
include(../zlib_dependency.pri)
-QT_FOR_CONFIG += gui-private
-include($$OUT_PWD/../../gui/qtgui-config.pri)
DEFINES += FT_CONFIG_OPTION_USE_PNG
-include($$PWD/../png_dependency.pri)
+QMAKE_USE_PRIVATE += libpng
DEFINES += TT_CONFIG_OPTION_SUBPIXEL_HINTING
diff --git a/src/3rdparty/freetype_dependency.pri b/src/3rdparty/freetype_dependency.pri
index cf86b66efd..ca871a92d7 100644
--- a/src/3rdparty/freetype_dependency.pri
+++ b/src/3rdparty/freetype_dependency.pri
@@ -1,6 +1,5 @@
qtConfig(system-freetype) {
QMAKE_USE_PRIVATE += freetype/nolink
} else: qtConfig(freetype) {
- INCLUDEPATH += $$PWD/freetype/include
- LIBS_PRIVATE += -L$$QT_BUILD_TREE/lib -lqtfreetype$$qtPlatformTargetSuffix()
+ QMAKE_USE_PRIVATE += freetype
}
diff --git a/src/3rdparty/harfbuzz-ng/harfbuzz-ng.pro b/src/3rdparty/harfbuzz-ng/harfbuzz-ng.pro
index 1bfeabb8c4..4ba2ee3ec4 100644
--- a/src/3rdparty/harfbuzz-ng/harfbuzz-ng.pro
+++ b/src/3rdparty/harfbuzz-ng/harfbuzz-ng.pro
@@ -1,10 +1,12 @@
-TARGET = qtharfbuzzng
+TARGET = qtharfbuzz
CONFIG += \
static \
hide_symbols \
exceptions_off rtti_off warn_off
+MODULE_INCLUDEPATH += $$PWD/include
+
load(qt_helper_lib)
# built-in shapers list configuration:
@@ -24,8 +26,6 @@ win32: DEFINES += HB_NO_WIN1256
#Workaround https://code.google.com/p/android/issues/detail?id=194631
android: DEFINES += _POSIX_C_SOURCE=200112L
-INCLUDEPATH += $$PWD/include
-
# Harfbuzz-NG inside Qt uses the Qt atomics (inline code only)
INCLUDEPATH += $$QT.core.includes
DEFINES += QT_NO_VERSION_TAGGING
diff --git a/src/3rdparty/harfbuzz_dependency.pri b/src/3rdparty/harfbuzz_dependency.pri
deleted file mode 100644
index 5946f403c5..0000000000
--- a/src/3rdparty/harfbuzz_dependency.pri
+++ /dev/null
@@ -1,6 +0,0 @@
-qtConfig(system-harfbuzz) {
- QMAKE_USE_PRIVATE += harfbuzz
-} else: qtConfig(harfbuzz) {
- INCLUDEPATH += $$PWD/harfbuzz-ng/include
- LIBS_PRIVATE += -L$$QT_BUILD_TREE/lib -lqtharfbuzzng$$qtPlatformTargetSuffix()
-}
diff --git a/src/3rdparty/libpng/libpng.pro b/src/3rdparty/libpng/libpng.pro
index ab6dd51e2b..577b61d833 100644
--- a/src/3rdparty/libpng/libpng.pro
+++ b/src/3rdparty/libpng/libpng.pro
@@ -1,4 +1,4 @@
-TARGET = qtpng
+TARGET = qtlibpng
CONFIG += \
static \
@@ -6,6 +6,8 @@ CONFIG += \
exceptions_off rtti_off warn_off \
installed
+MODULE_INCLUDEPATH = $$PWD
+
load(qt_helper_lib)
DEFINES += PNG_ARM_NEON_OPT=0
diff --git a/src/3rdparty/pcre/pcre.pro b/src/3rdparty/pcre/pcre.pro
index fad82b80b1..add4a932b3 100644
--- a/src/3rdparty/pcre/pcre.pro
+++ b/src/3rdparty/pcre/pcre.pro
@@ -5,12 +5,14 @@ CONFIG += \
hide_symbols \
exceptions_off rtti_off warn_off
+win32: MODULE_DEFINES += PCRE_STATIC
+MODULE_INCLUDEPATH += $$PWD
+
load(qt_helper_lib)
DEFINES += HAVE_CONFIG_H
# platform/compiler specific definitions
-win32: DEFINES += PCRE_STATIC
uikit|qnx|winrt: DEFINES += PCRE_DISABLE_JIT
SOURCES += \
diff --git a/src/3rdparty/pcre_dependency.pri b/src/3rdparty/pcre_dependency.pri
deleted file mode 100644
index f1355eabe6..0000000000
--- a/src/3rdparty/pcre_dependency.pri
+++ /dev/null
@@ -1,7 +0,0 @@
-qtConfig(system-pcre) {
- QMAKE_USE_PRIVATE += pcre
-} else {
- win32: DEFINES += PCRE_STATIC
- INCLUDEPATH += $$PWD/pcre
- LIBS_PRIVATE += -L$$QT_BUILD_TREE/lib -lqtpcre$$qtPlatformTargetSuffix()
-}
diff --git a/src/3rdparty/png_dependency.pri b/src/3rdparty/png_dependency.pri
deleted file mode 100644
index 50711358a0..0000000000
--- a/src/3rdparty/png_dependency.pri
+++ /dev/null
@@ -1,6 +0,0 @@
-qtConfig(system-png) {
- QMAKE_USE_PRIVATE += libpng
-} else: qtConfig(png) {
- INCLUDEPATH += $$PWD/libpng
- LIBS_PRIVATE += -L$$QT_BUILD_TREE/lib -lqtpng$$qtPlatformTargetSuffix()
-}
diff --git a/src/angle/src/libEGL/libEGL.pro b/src/angle/src/libEGL/libEGL.pro
index 860b60735e..3b2d516ecb 100644
--- a/src/angle/src/libEGL/libEGL.pro
+++ b/src/angle/src/libEGL/libEGL.pro
@@ -3,7 +3,8 @@ DEF_FILE_TARGET=$${TARGET}
TARGET=$$qtLibraryTarget($${LIBEGL_NAME})
winrt: LIBS_PRIVATE += -ld3d11
-LIBS_PRIVATE += -ldxguid -L$$QT_BUILD_TREE/lib -l$$qtLibraryTarget($${LIBGLESV2_NAME})
+LIBS_PRIVATE += -ldxguid
+QMAKE_USE_PRIVATE += $${LIBGLESV2_NAME}
DEFINES += GL_APICALL= GL_GLEXT_PROTOTYPES= EGLAPI= LIBEGL_IMPLEMENTATION
diff --git a/src/corelib/tools/tools.pri b/src/corelib/tools/tools.pri
index 47b0b2d4be..fb80bbd6b8 100644
--- a/src/corelib/tools/tools.pri
+++ b/src/corelib/tools/tools.pri
@@ -174,7 +174,7 @@ qtConfig(timezone) {
}
qtConfig(regularexpression) {
- include($$PWD/../../3rdparty/pcre_dependency.pri)
+ QMAKE_USE_PRIVATE += pcre
HEADERS += tools/qregularexpression.h
SOURCES += tools/qregularexpression.cpp
diff --git a/src/gui/image/image.pri b/src/gui/image/image.pri
index 3c4d2c0bbf..bac00f7e95 100644
--- a/src/gui/image/image.pri
+++ b/src/gui/image/image.pri
@@ -74,7 +74,7 @@ SOURCES += \
qtConfig(png) {
HEADERS += image/qpnghandler_p.h
SOURCES += image/qpnghandler.cpp
- include($$PWD/../../3rdparty/png_dependency.pri)
+ QMAKE_USE_PRIVATE += libpng
}
# SIMD
diff --git a/src/gui/text/text.pri b/src/gui/text/text.pri
index 3fe47a6645..c1c52f2d1a 100644
--- a/src/gui/text/text.pri
+++ b/src/gui/text/text.pri
@@ -88,7 +88,7 @@ HEADERS += \
qtConfig(harfbuzz)|qtConfig(system-harfbuzz) {
DEFINES += QT_ENABLE_HARFBUZZ_NG
- include($$PWD/../../3rdparty/harfbuzz_dependency.pri)
+ QMAKE_USE_PRIVATE += harfbuzz
SOURCES += text/qharfbuzzng.cpp
HEADERS += text/qharfbuzzng_p.h
diff --git a/src/plugins/platforms/xcb/gl_integrations/gl_integrations_plugin_base.pri b/src/plugins/platforms/xcb/gl_integrations/gl_integrations_plugin_base.pri
index a3813ef993..a94815dfbd 100644
--- a/src/plugins/platforms/xcb/gl_integrations/gl_integrations_plugin_base.pri
+++ b/src/plugins/platforms/xcb/gl_integrations/gl_integrations_plugin_base.pri
@@ -22,10 +22,7 @@ CONFIG += qpa/genericunixfontdatabase
!qtConfig(system-xcb) {
DEFINES += XCB_USE_RENDER
- XCB_DIR = $$clean_path($$PWD/../../../../3rdparty/xcb)
- INCLUDEPATH += $$XCB_DIR/include $$XCB_DIR/include/xcb $$XCB_DIR/sysinclude
- LIBS += -L$$MODULE_BASE_OUTDIR/lib -lxcb-static$$qtPlatformTargetSuffix()
- QMAKE_USE += xcb
+ QMAKE_USE += xcb-static xcb
} else {
qtConfig(xkb): QMAKE_USE += xcb_xkb
# to support custom cursors with depth > 1
diff --git a/src/plugins/platforms/xcb/xcb-static/xcb-static.pro b/src/plugins/platforms/xcb/xcb-static/xcb-static.pro
index a1dec2b0b5..f3e54813ee 100644
--- a/src/plugins/platforms/xcb/xcb-static/xcb-static.pro
+++ b/src/plugins/platforms/xcb/xcb-static/xcb-static.pro
@@ -5,11 +5,11 @@
# libxcb-xinerama
#
CONFIG += static
-load(qt_helper_lib)
XCB_DIR = ../../../../3rdparty/xcb
-INCLUDEPATH += $$XCB_DIR/include $$XCB_DIR/include/xcb $$XCB_DIR/sysinclude
+MODULE_INCLUDEPATH += $$XCB_DIR/include $$XCB_DIR/sysinclude
+INCLUDEPATH += $$XCB_DIR/include/xcb
QMAKE_USE += xcb/nolink
@@ -75,3 +75,5 @@ SOURCES += \
OTHER_FILES = $$XCB_DIR/README
TR_EXCLUDE += $$XCB_DIR/*
+
+load(qt_helper_lib)
diff --git a/src/plugins/platforms/xcb/xcb_qpa_lib.pro b/src/plugins/platforms/xcb/xcb_qpa_lib.pro
index 246bb1f118..69d2e35606 100644
--- a/src/plugins/platforms/xcb/xcb_qpa_lib.pro
+++ b/src/plugins/platforms/xcb/xcb_qpa_lib.pro
@@ -68,10 +68,7 @@ CONFIG += qpa/genericunixfontdatabase
!qtConfig(system-xcb) {
DEFINES += XCB_USE_RENDER
- XCB_DIR = ../../../3rdparty/xcb
- INCLUDEPATH += $$XCB_DIR/include $$XCB_DIR/sysinclude
- LIBS += -L$$MODULE_BASE_OUTDIR/lib -lxcb-static$$qtPlatformTargetSuffix()
- QMAKE_USE += xcb
+ QMAKE_USE += xcb-static xcb
} else {
LIBS += -lxcb-xinerama ### there is no configure test for this!
qtConfig(xkb): QMAKE_USE += xcb_xkb