build qt-png as a proper helper library
it ends up in QtGui via two different routes (freetype and the png handler), and we really don't want to have two copies of it in there. Change-Id: I40760bcb6c615b90ed9f402450bb657c77884613 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>bb10
parent
f15c0b695a
commit
9ebe146fee
|
|
@ -68,12 +68,7 @@ DEFINES += FT2_BUILD_LIBRARY
|
|||
DEFINES += FT_CONFIG_OPTION_SYSTEM_ZLIB
|
||||
include(../zlib_dependency.pri)
|
||||
|
||||
contains(QT_CONFIG, system-png) {
|
||||
DEFINES += FT_CONFIG_OPTION_USE_PNG
|
||||
include($$PWD/../png_dependency.pri)
|
||||
} else:!contains(QT_CONFIG, no-png):!win32 {
|
||||
DEFINES += FT_CONFIG_OPTION_USE_PNG
|
||||
include($$PWD/../libpng.pri)
|
||||
}
|
||||
DEFINES += FT_CONFIG_OPTION_USE_PNG
|
||||
include($$PWD/../png_dependency.pri)
|
||||
|
||||
DEFINES += TT_CONFIG_OPTION_SUBPIXEL_HINTING
|
||||
|
|
|
|||
|
|
@ -1,21 +0,0 @@
|
|||
DEFINES += PNG_ARM_NEON_OPT=0
|
||||
INCLUDEPATH += $$PWD/libpng
|
||||
SOURCES += $$PWD/libpng/png.c \
|
||||
$$PWD/libpng/pngerror.c \
|
||||
$$PWD/libpng/pngget.c \
|
||||
$$PWD/libpng/pngmem.c \
|
||||
$$PWD/libpng/pngpread.c \
|
||||
$$PWD/libpng/pngread.c \
|
||||
$$PWD/libpng/pngrio.c \
|
||||
$$PWD/libpng/pngrtran.c \
|
||||
$$PWD/libpng/pngrutil.c \
|
||||
$$PWD/libpng/pngset.c \
|
||||
$$PWD/libpng/pngtrans.c \
|
||||
$$PWD/libpng/pngwio.c \
|
||||
$$PWD/libpng/pngwrite.c \
|
||||
$$PWD/libpng/pngwtran.c \
|
||||
$$PWD/libpng/pngwutil.c
|
||||
|
||||
TR_EXCLUDE += $$PWD/*
|
||||
|
||||
include($$PWD/zlib_dependency.pri)
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
TARGET = qtpng
|
||||
|
||||
CONFIG += \
|
||||
static \
|
||||
hide_symbols \
|
||||
exceptions_off rtti_off warn_off
|
||||
|
||||
load(qt_helper_lib)
|
||||
|
||||
DEFINES += PNG_ARM_NEON_OPT=0
|
||||
SOURCES += \
|
||||
png.c \
|
||||
pngerror.c \
|
||||
pngget.c \
|
||||
pngmem.c \
|
||||
pngpread.c \
|
||||
pngread.c \
|
||||
pngrio.c \
|
||||
pngrtran.c \
|
||||
pngrutil.c \
|
||||
pngset.c \
|
||||
pngtrans.c \
|
||||
pngwio.c \
|
||||
pngwrite.c \
|
||||
pngwtran.c \
|
||||
pngwutil.c
|
||||
|
||||
TR_EXCLUDE += $$PWD/*
|
||||
|
||||
include(../zlib_dependency.pri)
|
||||
|
|
@ -2,5 +2,6 @@ contains(QT_CONFIG, system-png) {
|
|||
unix|mingw: LIBS_PRIVATE += -lpng
|
||||
else: LIBS += libpng.lib
|
||||
} else: contains(QT_CONFIG, png) {
|
||||
include($$PWD/libpng.pri)
|
||||
INCLUDEPATH += $$PWD/libpng
|
||||
LIBS_PRIVATE += -L$$QT_BUILD_TREE/lib -lqtpng$$qtPlatformTargetSuffix()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -88,6 +88,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_libpng.subdir = $$PWD/3rdparty/libpng
|
||||
src_3rdparty_libpng.target = sub-3rdparty-libpng
|
||||
|
||||
src_3rdparty_freetype.subdir = $$PWD/3rdparty/freetype
|
||||
src_3rdparty_freetype.target = sub-3rdparty-freetype
|
||||
|
||||
|
|
@ -132,6 +135,7 @@ src_android.subdir = $$PWD/android
|
|||
contains(QT_CONFIG, zlib)|cross_compile {
|
||||
SUBDIRS += src_qtzlib
|
||||
contains(QT_CONFIG, zlib) {
|
||||
src_3rdparty_libpng.depends += src_corelib
|
||||
src_3rdparty_freetype.depends += src_corelib
|
||||
}
|
||||
}
|
||||
|
|
@ -163,6 +167,11 @@ contains(QT_CONFIG, concurrent):SUBDIRS += src_concurrent
|
|||
SUBDIRS += src_angle
|
||||
src_gui.depends += src_angle
|
||||
}
|
||||
contains(QT_CONFIG, png) {
|
||||
SUBDIRS += src_3rdparty_libpng
|
||||
src_3rdparty_freetype.depends += src_3rdparty_libpng
|
||||
src_plugins.depends += src_3rdparty_libpng
|
||||
}
|
||||
contains(QT_CONFIG, freetype) {
|
||||
SUBDIRS += src_3rdparty_freetype
|
||||
src_platformsupport.depends += src_3rdparty_freetype
|
||||
|
|
|
|||
Loading…
Reference in New Issue