fix error when cross-compiling with --system-zlib

This is broken since 1f461ac45b, where
Z_PREFIX was defined to namespace the bundled zlib symbols. The
bundled zlib is used by bootstrap.pro when cross-compiling which uses
the namespaced symbols. This breaks linking of rcc when --system-zlib
is used, as it will try to link to compress2 instead of z_compress2.

To fix this, the aliases are pulled in via zconf.h and the bundled
zlib is prepended to the INCLUDEPATH (i.e. before the system zlib).

Change-Id: Iec76cbdead40f888e2ac6a887ec8f3b7bc7db501
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
bb10
Ashish Kulkarni 2014-12-21 06:36:24 +05:30
parent 72bc032ca8
commit da6a706eb3
2 changed files with 2 additions and 1 deletions

View File

@ -1,5 +1,5 @@
wince*: DEFINES += NO_ERRNO_H
INCLUDEPATH += $$PWD/zlib
INCLUDEPATH = $$PWD/zlib $$INCLUDEPATH
SOURCES+= \
$$PWD/zlib/adler32.c \
$$PWD/zlib/compress.c \

View File

@ -43,6 +43,7 @@
#include <qmath.h>
#ifndef QT_NO_COMPRESS
#include <zconf.h>
#include <zlib.h>
#endif
#include <ctype.h>