summaryrefslogtreecommitdiffstats
path: root/src/sql
diff options
context:
space:
mode:
authorMark Brand <mabrand@mabrand.nl>2010-02-17 15:51:38 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2010-02-17 16:15:20 (GMT)
commit3d5d159ac8ef506e6b1f33822547df0af54bbeb3 (patch)
tree400836a44f91ae618e57182894b73e3302965a7c /src/sql
parentd7f6785ba9bbb61d0b6e8f80ef8bf9da0e90442e (diff)
downloadQt-3d5d159ac8ef506e6b1f33822547df0af54bbeb3.zip
Qt-3d5d159ac8ef506e6b1f33822547df0af54bbeb3.tar.gz
Qt-3d5d159ac8ef506e6b1f33822547df0af54bbeb3.tar.bz2
remove -lz from QT_LFLAGS_PSQL so as to respect qt-zlib
QT_LFLAGS_PSQL can introduce -lz. To respect qt-zlib, this must be be removed so that zlib will come from -lQtCore4. Otherwise, linking can fail due to there being two different libraries providing zlib. This affects building shared Qt. This patch fixes the problem for win32-g++ and also unix. Assumed that QT_LFLAGS_PSQL is set in configure step if -lpq is not enough. Not sure why parallel logic is in src/sql/drivers/drivers.pri but I fixed that too. Merge-request: 405 Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>
Diffstat (limited to 'src/sql')
-rw-r--r--src/sql/drivers/drivers.pri13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/sql/drivers/drivers.pri b/src/sql/drivers/drivers.pri
index 184eca9..aac0267 100644
--- a/src/sql/drivers/drivers.pri
+++ b/src/sql/drivers/drivers.pri
@@ -6,19 +6,16 @@ contains(sql-drivers, psql) {
HEADERS += drivers/psql/qsql_psql.h
SOURCES += drivers/psql/qsql_psql.cpp
- unix {
- !isEmpty(QT_LFLAGS_PSQL) {
- LIBS *= $$QT_LFLAGS_PSQL
+ unix|win32-g++ {
+ !static:!isEmpty(QT_LFLAGS_PSQL) {
+ !contains(QT_CONFIG, system-zlib): QT_LFLAGS_PSQL -= -lz
+ !static:LIBS *= $$QT_LFLAGS_PSQL
QMAKE_CXXFLAGS *= $$QT_CFLAGS_PSQL
}
!contains(LIBS, .*pq.*):LIBS *= -lpq
}
- win32 {
- !win32-g++:!contains( LIBS, .*pq.* ):LIBS *= -llibpq
- win32-g++:!contains( LIBS, .*pq.* ):LIBS *= -lpq
- LIBS *= -lws2_32 -ladvapi32
- }
+ win32:!win32-g++:!contains(LIBS, .*pq.* ) LIBS *= -llibpq -lws2_32 -ladvapi32
}
contains(sql-drivers, mysql) {