Permalink
Browse files

Use shared zlib on windows

  • Loading branch information...
1 parent 02064b1 commit a21b8f3bebd2782df60350701fa8ba9e8e076e4e @Ri0n Ri0n committed Apr 18, 2012
Showing with 27 additions and 40 deletions.
  1. +0 −3 conf_windows.pri
  2. +13 −15 configure
  3. BIN configure.exe
  4. +2 −2 qcm/openssl.qcm
  5. +11 −13 qcm/zlib.qcm
  6. +0 −6 src/conf_iris.pri
  7. +1 −1 src/libpsi
View
@@ -4,9 +4,6 @@
CONFIG += release
#CONFIG += qca-static
-# tell iris to use our internal libz
-CONFIG += psi-winzlib
-
# OpenSSL
qca-static {
DEFINES += HAVE_OPENSSL
View
@@ -867,8 +867,8 @@ public:
if(!success)
return false;
- conf->addIncludePath(ossl_inc);
- conf->addLib(QString("-L") + ossl_lib);
+ conf->addIncludePath(ossl_inc.replace("\\\", "\\\\\\\"));
+ conf->addLib(QString("-L") + ossl_lib.replace("\\\", "\\\\\\\"));
conf->addLib(libname_success);
conf->addDefine("HAVE_OPENSSL");
@@ -962,20 +962,9 @@ public:
qc_zlib(Conf *c) : ConfObj(c) {}
QString name() const { return "zlib"; }
QString shortname() const { return "zlib"; }
-#ifdef Q_OS_WIN
- QString resultString() const
- {
- return "using bundled";
- }
-#endif
bool exec()
{
-#ifdef Q_OS_WIN
- // HACK: on windows, always use psi's bundled zlib
- conf->addExtra("CONFIG += psi-winzlib psi-minizip");
- return true;
-#else
QStringList incs;
QString version, libs, other;
QString s;
@@ -991,7 +980,7 @@ public:
if(!conf->findHeader("zlib.h", QStringList(), &s))
return false;
}
- incs.append(s);
+ incs.append(s.replace("\\\", "\\\\\\\"));
s = conf->getenv("QC_WITH_ZLIB_LIB");
if(!s.isEmpty()) {
@@ -1002,14 +991,23 @@ public:
if(!conf->findLibrary("z", &s))
return false;
}
- libs = s.isEmpty()? "-lz" : QString("-L%1 -lz").arg(s);
+ if (!s.isEmpty()) {
+ libs = QString("-L%1 -lz").arg(s.replace("\\\", "\\\\\\\"));
+ } else {
+ libs = s.isEmpty()? "-lz" : QString("-L%1 -lz").arg(s);
+ }
}
foreach(const QString &inc, incs) {
conf->addIncludePath(inc);
}
conf->addLib(libs);
+#ifdef Q_OS_WIN
+ // HACK: on windows, always use psi's bundled minizip
+ conf->addExtra("CONFIG += psi-minizip");
+ return true;
+#else
incs.clear();
libs.clear();
if(!conf->findPkgConfig("minizip", VersionAny, "", &version, &incs, &libs, &other)) {
View
Binary file not shown.
View
@@ -68,8 +68,8 @@ public:
if(!success)
return false;
- conf->addIncludePath(ossl_inc);
- conf->addLib(QString("-L") + ossl_lib);
+ conf->addIncludePath(ossl_inc.replace("\\\", "\\\\\\\"));
+ conf->addLib(QString("-L") + ossl_lib.replace("\\\", "\\\\\\\"));
conf->addLib(libname_success);
conf->addDefine("HAVE_OPENSSL");
View
@@ -15,20 +15,9 @@ public:
qc_zlib(Conf *c) : ConfObj(c) {}
QString name() const { return "zlib"; }
QString shortname() const { return "zlib"; }
-#ifdef Q_OS_WIN
- QString resultString() const
- {
- return "using bundled";
- }
-#endif
bool exec()
{
-#ifdef Q_OS_WIN
- // HACK: on windows, always use psi's bundled zlib
- conf->addExtra("CONFIG += psi-winzlib psi-minizip");
- return true;
-#else
QStringList incs;
QString version, libs, other;
QString s;
@@ -44,7 +33,7 @@ public:
if(!conf->findHeader("zlib.h", QStringList(), &s))
return false;
}
- incs.append(s);
+ incs.append(s.replace("\\\", "\\\\\\\"));
s = conf->getenv("QC_WITH_ZLIB_LIB");
if(!s.isEmpty()) {
@@ -55,14 +44,23 @@ public:
if(!conf->findLibrary("z", &s))
return false;
}
- libs = s.isEmpty()? "-lz" : QString("-L%1 -lz").arg(s);
+ if (!s.isEmpty()) {
+ libs = QString("-L%1 -lz").arg(s.replace("\\\", "\\\\\\\"));
+ } else {
+ libs = s.isEmpty()? "-lz" : QString("-L%1 -lz").arg(s);
+ }
}
foreach(const QString &inc, incs) {
conf->addIncludePath(inc);
}
conf->addLib(libs);
+#ifdef Q_OS_WIN
+ // HACK: on windows, always use psi's bundled minizip
+ conf->addExtra("CONFIG += psi-minizip");
+ return true;
+#else
incs.clear();
libs.clear();
if(!conf->findPkgConfig("minizip", VersionAny, "", &version, &incs, &libs, &other)) {
View
@@ -13,12 +13,6 @@ else {
CONFIG += crypto
}
-psi-winzlib {
- INCLUDEPATH += $$PWD/libpsi/tools/zip/minizip/win32
- DEPENDPATH += $$PWD/libpsi/tools/zip/minizip/win32
- LIBS += $$PWD/libpsi/tools/zip/minizip/win32/libz.a
-}
-
mac {
# Universal binaries
qc_universal:contains(QT_CONFIG,x86):contains(QT_CONFIG,ppc) {

0 comments on commit a21b8f3

Please sign in to comment.