Build bundled freetype as qt_helper_lib
And thus do not disable warnings for the whole module when configured with -qt-freetype. Change-Id: I601a7c2990c8e3377531a28078db73800c138ec1 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
This commit is contained in:
parent
ebafb2f14b
commit
f2486adc1b
69
src/3rdparty/freetype.pri
vendored
69
src/3rdparty/freetype.pri
vendored
@ -1,69 +0,0 @@
|
||||
QT_FREETYPE_DIR = $$PWD/freetype
|
||||
|
||||
SOURCES += \
|
||||
$$QT_FREETYPE_DIR/src/autofit/afangles.c \
|
||||
$$QT_FREETYPE_DIR/src/autofit/afdummy.c \
|
||||
$$QT_FREETYPE_DIR/src/autofit/afglobal.c \
|
||||
$$QT_FREETYPE_DIR/src/autofit/afhints.c \
|
||||
$$QT_FREETYPE_DIR/src/autofit/aflatin.c \
|
||||
$$QT_FREETYPE_DIR/src/autofit/afloader.c \
|
||||
$$QT_FREETYPE_DIR/src/autofit/afmodule.c \
|
||||
$$QT_FREETYPE_DIR/src/autofit/autofit.c \
|
||||
$$QT_FREETYPE_DIR/src/base/ftbase.c \
|
||||
$$QT_FREETYPE_DIR/src/base/ftbitmap.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/ftlcdfil.c \
|
||||
$$QT_FREETYPE_DIR/src/base/ftmm.c \
|
||||
$$QT_FREETYPE_DIR/src/base/ftsynth.c \
|
||||
$$QT_FREETYPE_DIR/src/base/fttype1.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/lzw/ftlzw.c \
|
||||
$$QT_FREETYPE_DIR/src/otvalid/otvalid.c \
|
||||
$$QT_FREETYPE_DIR/src/otvalid/otvbase.c \
|
||||
$$QT_FREETYPE_DIR/src/otvalid/otvcommn.c \
|
||||
$$QT_FREETYPE_DIR/src/otvalid/otvgdef.c \
|
||||
$$QT_FREETYPE_DIR/src/otvalid/otvgpos.c \
|
||||
$$QT_FREETYPE_DIR/src/otvalid/otvgsub.c \
|
||||
$$QT_FREETYPE_DIR/src/otvalid/otvjstf.c \
|
||||
$$QT_FREETYPE_DIR/src/otvalid/otvmod.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
|
||||
|
||||
win32 {
|
||||
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
|
||||
include($$PWD/zlib_dependency.pri)
|
||||
}
|
||||
|
||||
DEFINES += TT_CONFIG_OPTION_SUBPIXEL_HINTING
|
||||
|
||||
# disable warnings about "unsafe" methods in C code
|
||||
msvc:QMAKE_CFLAGS_WARN_ON += -wd"4996"
|
||||
|
||||
TR_EXCLUDE += $$QT_FREETYPE_DIR/*
|
71
src/3rdparty/freetype/freetype.pro
vendored
Normal file
71
src/3rdparty/freetype/freetype.pro
vendored
Normal file
@ -0,0 +1,71 @@
|
||||
TARGET = qtfreetype
|
||||
|
||||
CONFIG += \
|
||||
static \
|
||||
hide_symbols \
|
||||
exceptions_off rtti_off warn_off
|
||||
|
||||
load(qt_helper_lib)
|
||||
|
||||
SOURCES += \
|
||||
$$PWD/src/autofit/afangles.c \
|
||||
$$PWD/src/autofit/afdummy.c \
|
||||
$$PWD/src/autofit/afglobal.c \
|
||||
$$PWD/src/autofit/afhints.c \
|
||||
$$PWD/src/autofit/aflatin.c \
|
||||
$$PWD/src/autofit/afloader.c \
|
||||
$$PWD/src/autofit/afmodule.c \
|
||||
$$PWD/src/autofit/autofit.c \
|
||||
$$PWD/src/base/ftbase.c \
|
||||
$$PWD/src/base/ftbitmap.c \
|
||||
$$PWD/src/base/ftbbox.c \
|
||||
$$PWD/src/base/ftdebug.c \
|
||||
$$PWD/src/base/ftglyph.c \
|
||||
$$PWD/src/base/ftinit.c \
|
||||
$$PWD/src/base/ftlcdfil.c \
|
||||
$$PWD/src/base/ftmm.c \
|
||||
$$PWD/src/base/ftsynth.c \
|
||||
$$PWD/src/base/fttype1.c \
|
||||
$$PWD/src/bdf/bdf.c \
|
||||
$$PWD/src/cache/ftcache.c \
|
||||
$$PWD/src/cff/cff.c \
|
||||
$$PWD/src/cid/type1cid.c \
|
||||
$$PWD/src/gzip/ftgzip.c \
|
||||
$$PWD/src/lzw/ftlzw.c \
|
||||
$$PWD/src/otvalid/otvalid.c \
|
||||
$$PWD/src/otvalid/otvbase.c \
|
||||
$$PWD/src/otvalid/otvcommn.c \
|
||||
$$PWD/src/otvalid/otvgdef.c \
|
||||
$$PWD/src/otvalid/otvgpos.c \
|
||||
$$PWD/src/otvalid/otvgsub.c \
|
||||
$$PWD/src/otvalid/otvjstf.c \
|
||||
$$PWD/src/otvalid/otvmod.c \
|
||||
$$PWD/src/pcf/pcf.c \
|
||||
$$PWD/src/pfr/pfr.c \
|
||||
$$PWD/src/psaux/psaux.c \
|
||||
$$PWD/src/pshinter/pshinter.c \
|
||||
$$PWD/src/psnames/psmodule.c \
|
||||
$$PWD/src/raster/raster.c \
|
||||
$$PWD/src/sfnt/sfnt.c \
|
||||
$$PWD/src/smooth/smooth.c \
|
||||
$$PWD/src/truetype/truetype.c \
|
||||
$$PWD/src/type1/type1.c \
|
||||
$$PWD/src/type42/type42.c \
|
||||
$$PWD/src/winfonts/winfnt.c
|
||||
|
||||
win32 {
|
||||
SOURCES += $$PWD/src/base/ftsystem.c
|
||||
} else {
|
||||
SOURCES += $$PWD/builds/unix/ftsystem.c
|
||||
INCLUDEPATH += $$PWD/builds/unix
|
||||
}
|
||||
|
||||
INCLUDEPATH += $$PWD/include
|
||||
|
||||
DEFINES += FT2_BUILD_LIBRARY
|
||||
contains(QT_CONFIG, system-zlib) {
|
||||
DEFINES += FT_CONFIG_OPTION_SYSTEM_ZLIB
|
||||
include($$PWD/../zlib_dependency.pri)
|
||||
}
|
||||
|
||||
DEFINES += TT_CONFIG_OPTION_SUBPIXEL_HINTING
|
7
src/3rdparty/freetype_dependency.pri
vendored
Normal file
7
src/3rdparty/freetype_dependency.pri
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
contains(QT_CONFIG, freetype) {
|
||||
INCLUDEPATH += $$PWD/freetype/include
|
||||
LIBS_PRIVATE += -L$$QT_BUILD_TREE/lib -lqtfreetype$$qtPlatformTargetSuffix()
|
||||
} else:contains(QT_CONFIG, system-freetype) {
|
||||
# pull in the proper freetype2 include directory
|
||||
include($$QT_SOURCE_TREE/config.tests/unix/freetype/freetype.pri)
|
||||
}
|
@ -10,9 +10,4 @@ SOURCES += \
|
||||
|
||||
CONFIG += opentype
|
||||
|
||||
contains(QT_CONFIG, freetype) {
|
||||
include($$QT_SOURCE_TREE/src/3rdparty/freetype.pri)
|
||||
} else:contains(QT_CONFIG, system-freetype) {
|
||||
# pull in the proper freetype2 include directory
|
||||
include($$QT_SOURCE_TREE/config.tests/unix/freetype/freetype.pri)
|
||||
}
|
||||
include($$QT_SOURCE_TREE/src/3rdparty/freetype_dependency.pri)
|
||||
|
@ -122,7 +122,7 @@ contains(QT_CONFIG,dynamicgl) {
|
||||
|
||||
contains(QT_CONFIG, freetype) {
|
||||
DEFINES *= QT_NO_FONTCONFIG
|
||||
include($$QT_SOURCE_TREE/src/3rdparty/freetype.pri)
|
||||
include($$QT_SOURCE_TREE/src/3rdparty/freetype_dependency.pri)
|
||||
HEADERS += \
|
||||
$$PWD/qwindowsfontdatabase_ft.h
|
||||
SOURCES += \
|
||||
|
@ -90,6 +90,9 @@ src_3rdparty_harfbuzzng.subdir = $$PWD/3rdparty/harfbuzz-ng
|
||||
src_3rdparty_harfbuzzng.target = sub-3rdparty-harfbuzzng
|
||||
src_3rdparty_harfbuzzng.depends = src_corelib # for the Qt atomics
|
||||
|
||||
src_3rdparty_freetype.subdir = $$PWD/3rdparty/freetype
|
||||
src_3rdparty_freetype.target = sub-3rdparty-freetype
|
||||
|
||||
src_angle.subdir = $$PWD/angle
|
||||
src_angle.target = sub-angle
|
||||
|
||||
@ -156,6 +159,10 @@ contains(QT_CONFIG, concurrent):SUBDIRS += src_concurrent
|
||||
SUBDIRS += src_angle
|
||||
src_gui.depends += src_angle
|
||||
}
|
||||
contains(QT_CONFIG, freetype) {
|
||||
SUBDIRS += src_3rdparty_freetype
|
||||
src_platformsupport.depends += src_3rdparty_freetype
|
||||
}
|
||||
SUBDIRS += src_gui src_platformsupport src_platformheaders
|
||||
contains(QT_CONFIG, opengl(es2)?):SUBDIRS += src_openglextensions
|
||||
src_plugins.depends += src_gui src_platformsupport src_platformheaders
|
||||
@ -182,7 +189,7 @@ android:!android-no-sdk: SUBDIRS += src_android
|
||||
TR_EXCLUDE = \
|
||||
src_tools_bootstrap src_tools_moc src_tools_rcc src_tools_uic src_tools_qlalr \
|
||||
src_tools_bootstrap_dbus src_tools_qdbusxml2cpp src_tools_qdbuscpp2xml \
|
||||
src_3rdparty_pcre src_3rdparty_harfbuzzng
|
||||
src_3rdparty_pcre src_3rdparty_harfbuzzng src_3rdparty_freetype
|
||||
|
||||
sub-tools.depends = $$TOOLS
|
||||
QMAKE_EXTRA_TARGETS = sub-tools
|
||||
|
Loading…
Reference in New Issue
Block a user