From 66539b167c01968f3040bfad9a59561a8b253639 Mon Sep 17 00:00:00 2001 From: Constantin Makshin Date: Thu, 10 Jun 2010 16:38:42 +0200 Subject: Updated project files so it is now possible to use "-system-zlib" configuration option on Windows and Symbian platforms. Improved support of "-system-jpeg" "-system-mng" "-system-png" and "-system-tiff" configuration options on Windows (thanks to Mark Brand ) Merge-request: 2411 Reviewed-by: Oswald Buddenhagen --- src/corelib/tools/tools.pri | 5 +++-- src/gui/image/image.pri | 14 +++++++++++--- src/gui/painting/painting.pri | 5 +++-- src/network/access/access.pri | 5 +++-- src/plugins/imageformats/jpeg/jpeg.pro | 4 ++-- src/plugins/imageformats/mng/mng.pro | 13 +++++++------ src/plugins/imageformats/tiff/tiff.pro | 18 ++++++++++++------ src/qbase.pri | 1 - src/svg/svg.pro | 4 +++- src/tools/bootstrap/bootstrap.pri | 5 +++-- src/tools/bootstrap/bootstrap.pro | 4 ++++ src/winmain/winmain.pro | 2 +- 12 files changed, 52 insertions(+), 28 deletions(-) diff --git a/src/corelib/tools/tools.pri b/src/corelib/tools/tools.pri index 4e0ebbc..e579dd5 100644 --- a/src/corelib/tools/tools.pri +++ b/src/corelib/tools/tools.pri @@ -106,8 +106,9 @@ contains(QT_CONFIG, zlib) { ../3rdparty/zlib/uncompr.c \ ../3rdparty/zlib/zutil.c } else:!contains(QT_CONFIG, no-zlib) { - unix:LIBS_PRIVATE += -lz -# win32:LIBS += libz.lib + symbian:LIBS_PRIVATE += -llibz + else:if(unix|win32-g++*):LIBS_PRIVATE += -lz + else:LIBS += zdll.lib } DEFINES += HB_EXPORT=Q_CORE_EXPORT diff --git a/src/gui/image/image.pri b/src/gui/image/image.pri index 8d75fdd..c4eac95 100644 --- a/src/gui/image/image.pri +++ b/src/gui/image/image.pri @@ -93,12 +93,12 @@ SOURCES += \ SOURCES += image/qpnghandler.cpp contains(QT_CONFIG, system-png) { - unix:LIBS_PRIVATE += -lpng - win32:LIBS += libpng.lib + unix|win32-g++*:LIBS_PRIVATE += -lpng + win32:!win32-g++*:LIBS += libpng.lib } else { DEFINES *= QT_USE_BUNDLED_LIBPNG !isEqual(QT_ARCH, i386):!isEqual(QT_ARCH, x86_64):DEFINES += PNG_NO_ASSEMBLER_CODE - INCLUDEPATH += ../3rdparty/libpng ../3rdparty/zlib + INCLUDEPATH += ../3rdparty/libpng SOURCES += ../3rdparty/libpng/png.c \ ../3rdparty/libpng/pngerror.c \ ../3rdparty/libpng/pngget.c \ @@ -114,6 +114,14 @@ SOURCES += \ ../3rdparty/libpng/pngwrite.c \ ../3rdparty/libpng/pngwtran.c \ ../3rdparty/libpng/pngwutil.c + + contains(QT_CONFIG, system-zlib) { + symbian:LIBS_PRIVATE += -llibz + else:if(unix|win32-g++*):LIBS_PRIVATE += -lz + else:LIBS += zdll.lib + } else { + INCLUDEPATH += ../3rdparty/zlib + } } } else { DEFINES *= QT_NO_IMAGEFORMAT_PNG diff --git a/src/gui/painting/painting.pri b/src/gui/painting/painting.pri index c3b0e3e..1900750 100644 --- a/src/gui/painting/painting.pri +++ b/src/gui/painting/painting.pri @@ -405,7 +405,8 @@ neon:*-g++* { contains(QT_CONFIG, zlib) { INCLUDEPATH += ../3rdparty/zlib } else:!contains(QT_CONFIG, no-zlib) { - unix:LIBS_PRIVATE += -lz -# win32:LIBS += libz.lib + symbian:LIBS_PRIVATE += -llibz + else:if(unix|win32-g++*):LIBS_PRIVATE += -lz + else:LIBS += zdll.lib } diff --git a/src/network/access/access.pri b/src/network/access/access.pri index aa36890..b91ccbd 100644 --- a/src/network/access/access.pri +++ b/src/network/access/access.pri @@ -61,6 +61,7 @@ SOURCES += access/qftp.cpp \ contains(QT_CONFIG, zlib) { INCLUDEPATH += ../3rdparty/zlib } else:!contains(QT_CONFIG, no-zlib) { - unix:LIBS_PRIVATE += -lz -# win32:LIBS += libz.lib + symbian:LIBS_PRIVATE += -llibz + else:if(unix|win32-g++*):LIBS_PRIVATE += -lz + else:LIBS += zdll.lib } diff --git a/src/plugins/imageformats/jpeg/jpeg.pro b/src/plugins/imageformats/jpeg/jpeg.pro index 5b45422..e28c5fb 100644 --- a/src/plugins/imageformats/jpeg/jpeg.pro +++ b/src/plugins/imageformats/jpeg/jpeg.pro @@ -22,8 +22,8 @@ symbian: { } contains(QT_CONFIG, system-jpeg) { - unix:LIBS += -ljpeg - win32:LIBS += libjpeg.lib + unix|win32-g++*:LIBS += -ljpeg + win32:!win32-g++*:LIBS += libjpeg.lib } !contains(QT_CONFIG, system-jpeg) { INCLUDEPATH += ../../../3rdparty/libjpeg diff --git a/src/plugins/imageformats/mng/mng.pro b/src/plugins/imageformats/mng/mng.pro index de7dfa7..f23a5ef 100644 --- a/src/plugins/imageformats/mng/mng.pro +++ b/src/plugins/imageformats/mng/mng.pro @@ -14,8 +14,8 @@ symbian: { } contains(QT_CONFIG, system-mng) { - unix:LIBS += -lmng - win32:LIBS += libmng.lib + unix|win32-g++*:LIBS += -lmng + win32:!win32-g++*:LIBS += libmng.lib } !contains(QT_CONFIG, system-mng) { DEFINES += MNG_BUILD_SO @@ -44,10 +44,11 @@ contains(QT_CONFIG, system-mng) { } contains(QT_CONFIG, system-zlib) { - LIBS += -lz -} -!contains(QT_CONFIG, system-zlib) { - INCLUDEPATH += ../../../3rdparty/zlib + symbian:LIBS_PRIVATE += -llibz + else:if(unix|win32-g++*):LIBS_PRIVATE += -lz + else:LIBS += zdll.lib +} else { + INCLUDEPATH += ../../../3rdparty/zlib } QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/imageformats diff --git a/src/plugins/imageformats/tiff/tiff.pro b/src/plugins/imageformats/tiff/tiff.pro index 3cb64ad..3bf203c 100644 --- a/src/plugins/imageformats/tiff/tiff.pro +++ b/src/plugins/imageformats/tiff/tiff.pro @@ -8,8 +8,13 @@ SOURCES += main.cpp \ qtiffhandler.cpp contains(QT_CONFIG, system-tiff) { - unix:LIBS += -ltiff - win32:LIBS += libtiff.lib + unix|win32-g++*:LIBS += -ltiff + win32:!win32-g++*:LIBS += libtiff.lib + + contains(QT_CONFIG, system-jpeg) { + unix|win32-g++*:LIBS += -ljpeg + win32:!win32-g++*:LIBS += libjpeg.lib + } } !contains(QT_CONFIG, system-tiff) { INCLUDEPATH += ../../../3rdparty/libtiff/libtiff @@ -64,10 +69,11 @@ contains(QT_CONFIG, system-tiff) { } contains(QT_CONFIG, system-zlib) { - LIBS += -lz -} -!contains(QT_CONFIG, system-zlib) { - INCLUDEPATH += ../../../3rdparty/zlib + symbian:LIBS_PRIVATE += -llibz + else:if(unix|win32-g++*):LIBS_PRIVATE += -lz + else:LIBS += zdll.lib +} else { + INCLUDEPATH += ../../../3rdparty/zlib } QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/imageformats diff --git a/src/qbase.pri b/src/qbase.pri index 83ae069..064e67c 100644 --- a/src/qbase.pri +++ b/src/qbase.pri @@ -85,7 +85,6 @@ win32-borland { } win32 { - CONFIG += zlib INCLUDEPATH += tmp !static: DEFINES+=QT_MAKEDLL } diff --git a/src/svg/svg.pro b/src/svg/svg.pro index d2a4227..fa975e7 100644 --- a/src/svg/svg.pro +++ b/src/svg/svg.pro @@ -46,5 +46,7 @@ symbian:TARGET.UID3=0x2001B2E2 contains(QT_CONFIG, zlib) { INCLUDEPATH += ../3rdparty/zlib } else:!contains(QT_CONFIG, no-zlib) { - unix:LIBS_PRIVATE += -lz + symbian:LIBS_PRIVATE += -llibz + else:if(unix|win32-g++*):LIBS_PRIVATE += -lz + else:LIBS += zdll.lib } diff --git a/src/tools/bootstrap/bootstrap.pri b/src/tools/bootstrap/bootstrap.pri index 1de7b18..1aa8121 100644 --- a/src/tools/bootstrap/bootstrap.pri +++ b/src/tools/bootstrap/bootstrap.pri @@ -52,8 +52,9 @@ hpux-acc*|hpuxi-acc* { LIBS += -lbootstrap } !contains(QT_CONFIG, zlib):!contains(QT_CONFIG, no-zlib):!cross_compile { - unix:LIBS += -lz -# win32:LIBS += libz.lib + symbian:LIBS_PRIVATE += -llibz + else:if(unix|win32-g++*):LIBS_PRIVATE += -lz + else:LIBS += zdll.lib } win32:LIBS += -luser32 diff --git a/src/tools/bootstrap/bootstrap.pro b/src/tools/bootstrap/bootstrap.pro index 44dd625..149291a 100644 --- a/src/tools/bootstrap/bootstrap.pro +++ b/src/tools/bootstrap/bootstrap.pro @@ -109,6 +109,10 @@ contains(QT_CONFIG, zlib)|cross_compile { ../3rdparty/zlib/trees.c \ ../3rdparty/zlib/uncompr.c \ ../3rdparty/zlib/zutil.c +} else:!contains(QT_CONFIG, no-zlib) { + symbian:LIBS_PRIVATE += -llibz + else:if(unix|win32-g++*):LIBS_PRIVATE += -lz + else:LIBS += zdll.lib } lib.CONFIG = dummy_install diff --git a/src/winmain/winmain.pro b/src/winmain/winmain.pro index efee3cd..0c9b214 100644 --- a/src/winmain/winmain.pro +++ b/src/winmain/winmain.pro @@ -11,7 +11,7 @@ win32 { win32-g++*:DEFINES += QT_NEEDS_QMAIN win32-borland:DEFINES += QT_NEEDS_QMAIN SOURCES = qtmain_win.cpp - CONFIG += png zlib + CONFIG += png CONFIG -= jpeg INCLUDEPATH += tmp $$QMAKE_INCDIR_QT/QtCore } -- cgit v0.12