This file is part of mingw-cross-env. See doc/index.html for further information. Commits backported (cherry-picked) from Qt 4.7 branch. http://qt.gitorious.org/qt commit b6d6681dc40ce34f231e74a63c13855b1e248aa1 Author: Mark Brand Date: Wed Jul 7 12:05:35 2010 +0200 Fixed whitespace formatting Merge-request: 715 Reviewed-by: Oswald Buddenhagen (cherry picked from commit 42fe2bfb65c85fc630efe32aa1d62d66f2caab2a) diff --git a/src/plugins/sqldrivers/db2/db2.pro b/src/plugins/sqldrivers/db2/db2.pro index 5223beb..25ca499 100644 --- a/src/plugins/sqldrivers/db2/db2.pro +++ b/src/plugins/sqldrivers/db2/db2.pro @@ -1,4 +1,4 @@ -TARGET = qsqldb2 +TARGET = qsqldb2 HEADERS = ../../../sql/drivers/db2/qsql_db2.h SOURCES = main.cpp \ diff --git a/src/plugins/sqldrivers/ibase/ibase.pro b/src/plugins/sqldrivers/ibase/ibase.pro index ec2bc7b..bb73adb 100644 --- a/src/plugins/sqldrivers/ibase/ibase.pro +++ b/src/plugins/sqldrivers/ibase/ibase.pro @@ -1,4 +1,4 @@ -TARGET = qsqlibase +TARGET = qsqlibase HEADERS = ../../../sql/drivers/ibase/qsql_ibase.h SOURCES = main.cpp \ diff --git a/src/plugins/sqldrivers/mysql/mysql.pro b/src/plugins/sqldrivers/mysql/mysql.pro index 9f5c619..b808c8e 100644 --- a/src/plugins/sqldrivers/mysql/mysql.pro +++ b/src/plugins/sqldrivers/mysql/mysql.pro @@ -1,4 +1,4 @@ -TARGET = qsqlmysql +TARGET = qsqlmysql HEADERS = ../../../sql/drivers/mysql/qsql_mysql.h SOURCES = main.cpp \ diff --git a/src/plugins/sqldrivers/oci/oci.pro b/src/plugins/sqldrivers/oci/oci.pro index 3bf70a1..d75827e 100644 --- a/src/plugins/sqldrivers/oci/oci.pro +++ b/src/plugins/sqldrivers/oci/oci.pro @@ -1,4 +1,4 @@ -TARGET = qsqloci +TARGET = qsqloci HEADERS = ../../../sql/drivers/oci/qsql_oci.h SOURCES = main.cpp \ diff --git a/src/plugins/sqldrivers/odbc/odbc.pro b/src/plugins/sqldrivers/odbc/odbc.pro index 2bf85f1..70070db 100644 --- a/src/plugins/sqldrivers/odbc/odbc.pro +++ b/src/plugins/sqldrivers/odbc/odbc.pro @@ -1,4 +1,4 @@ -TARGET = qsqlodbc +TARGET = qsqlodbc HEADERS = ../../../sql/drivers/odbc/qsql_odbc.h SOURCES = main.cpp \ diff --git a/src/plugins/sqldrivers/psql/psql.pro b/src/plugins/sqldrivers/psql/psql.pro index 80a5348..9586695 100644 --- a/src/plugins/sqldrivers/psql/psql.pro +++ b/src/plugins/sqldrivers/psql/psql.pro @@ -1,4 +1,4 @@ -TARGET = qsqlpsql +TARGET = qsqlpsql HEADERS = ../../../sql/drivers/psql/qsql_psql.h SOURCES = main.cpp \ diff --git a/src/plugins/sqldrivers/sqlite/sqlite.pro b/src/plugins/sqldrivers/sqlite/sqlite.pro index fb31233..75f04b9 100644 --- a/src/plugins/sqldrivers/sqlite/sqlite.pro +++ b/src/plugins/sqldrivers/sqlite/sqlite.pro @@ -1,4 +1,4 @@ -TARGET = qsqlite +TARGET = qsqlite HEADERS = ../../../sql/drivers/sqlite/qsql_sqlite.h SOURCES = smain.cpp \ diff --git a/src/plugins/sqldrivers/sqlite2/sqlite2.pro b/src/plugins/sqldrivers/sqlite2/sqlite2.pro index 88db22a..0f6c19a 100644 --- a/src/plugins/sqldrivers/sqlite2/sqlite2.pro +++ b/src/plugins/sqldrivers/sqlite2/sqlite2.pro @@ -1,4 +1,4 @@ -TARGET = qsqlite2 +TARGET = qsqlite2 HEADERS = ../../../sql/drivers/sqlite2/qsql_sqlite2.h SOURCES = smain.cpp \ diff --git a/src/plugins/sqldrivers/tds/tds.pro b/src/plugins/sqldrivers/tds/tds.pro index 08a166b..ba40be5 100644 --- a/src/plugins/sqldrivers/tds/tds.pro +++ b/src/plugins/sqldrivers/tds/tds.pro @@ -1,4 +1,4 @@ -TARGET = qsqltds +TARGET = qsqltds HEADERS = ../../../sql/drivers/tds/qsql_tds.h commit 51d53d80f5e3c4d53b02043b0e85968be097cb68 Author: Mark Brand Date: Thu Aug 26 22:06:23 2010 +0200 Revert "Fixed automatic sqlite extraction on Symbian makefile build system." This reverts commit 0aa77f3afe01de462edf0ee6a0bdf78854431cf1. Reverted to avoid collisions with d7557de99b38031906c17c54496cb76a13dec5f7 on drivers.pri from 4.7 branch. diff --git a/mkspecs/common/symbian/symbian.conf b/mkspecs/common/symbian/symbian.conf index 7ec5c6c..c1b31e5 100644 --- a/mkspecs/common/symbian/symbian.conf +++ b/mkspecs/common/symbian/symbian.conf @@ -105,7 +105,6 @@ QMAKE_IDL = midl QMAKE_LIB = ar -ru QMAKE_RC = windres QMAKE_ZIP = zip -r -9 -QMAKE_UNZIP = unzip -o QMAKE_TAR = tar -cf QMAKE_GZIP = gzip -9f diff --git a/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pri b/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pri deleted file mode 100644 index ab8d846..0000000 --- a/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pri +++ /dev/null @@ -1,38 +0,0 @@ -# We just want to include the sqlite3 binaries for Symbian for platforms that do not have them. -!symbian-abld:!symbian-sbsv2 { - !symbian_no_export_sqlite:!exists($${EPOCROOT}epoc32/release/armv5/lib/sqlite3.dso) { - symbian_sqlite3_zip_file = $$PWD/SQLite3_v9.2.zip - - # The QMAKE_COPY section is to update timestamp on the file. - symbian_sqlite3_header.input = symbian_sqlite3_zip_file - symbian_sqlite3_header.output = sqlite3.h - !isEmpty(MOC_DIR):symbian_sqlite3_header.output = $$MOC_DIR/$$symbian_sqlite3_header.output - symbian_sqlite3_header.CONFIG = combine no_link - symbian_sqlite3_header.dependency_type = TYPE_C - symbian_sqlite3_header.commands = $$QMAKE_UNZIP -j ${QMAKE_FILE_NAME} epoc32/include/stdapis/${QMAKE_FILE_OUT_BASE}.h \ - && $$QMAKE_COPY ${QMAKE_FILE_OUT_BASE}.h ${QMAKE_FILE_OUT}.tmp \ - && $$QMAKE_DEL_FILE ${QMAKE_FILE_OUT_BASE}.h \ - && $$QMAKE_MOVE ${QMAKE_FILE_OUT}.tmp ${QMAKE_FILE_OUT} - QMAKE_EXTRA_COMPILERS += symbian_sqlite3_header - - # The QMAKE_COPY section is to update timestamp on the file. - symbian_sqlite3_dso.input = symbian_sqlite3_zip_file - symbian_sqlite3_dso.output = sqlite3.dso - !isEmpty(OBJECTS_DIR):symbian_sqlite3_dso.output = $$OBJECTS_DIR/$$symbian_sqlite3_dso.output - symbian_sqlite3_dso.CONFIG = combine no_link target_predeps - symbian_sqlite3_dso.commands = $$QMAKE_UNZIP -j ${QMAKE_FILE_NAME} epoc32/release/armv5/lib/${QMAKE_FILE_OUT_BASE}.dso \ - && $$QMAKE_COPY ${QMAKE_FILE_OUT_BASE}.dso ${QMAKE_FILE_OUT}.tmp \ - && $$QMAKE_DEL_FILE ${QMAKE_FILE_OUT_BASE}.dso \ - && $$QMAKE_MOVE ${QMAKE_FILE_OUT}.tmp ${QMAKE_FILE_OUT} - QMAKE_EXTRA_COMPILERS += symbian_sqlite3_dso - - symbian_sqlite3_ver_dso.input = symbian_sqlite3_zip_file - symbian_sqlite3_ver_dso.output = sqlite3{00060003}.dso - !isEmpty(OBJECTS_DIR):symbian_sqlite3_ver_dso.output = $$OBJECTS_DIR/$$symbian_sqlite3_ver_dso.output - symbian_sqlite3_ver_dso.CONFIG = $$symbian_sqlite3_dso.CONFIG - symbian_sqlite3_ver_dso.commands = $$symbian_sqlite3_dso.commands - QMAKE_EXTRA_COMPILERS += symbian_sqlite3_ver_dso - - QMAKE_LIBDIR *= $$OBJECTS_DIR - } -} diff --git a/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pro b/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pro index 0d233e6..691cce1 100644 --- a/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pro +++ b/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pro @@ -2,7 +2,7 @@ TEMPLATE = subdirs # We just want to export the sqlite3 binaries for Symbian for platforms that do not have them. -symbian-abld|symbian-sbsv2 { +symbian { !symbian_no_export_sqlite:!exists($${EPOCROOT}epoc32/release/armv5/lib/sqlite3.dso) { BLD_INF_RULES.prj_exports += ":zip SQLite3_v9.2.zip" } diff --git a/src/sql/drivers/drivers.pri b/src/sql/drivers/drivers.pri index c68442d..05e7265 100644 --- a/src/sql/drivers/drivers.pri +++ b/src/sql/drivers/drivers.pri @@ -114,8 +114,6 @@ contains(sql-drivers, sqlite) { QMAKE_CXXFLAGS *= $$QT_CFLAGS_SQLITE } - symbian:include(../../plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pri) - HEADERS += drivers/sqlite/qsql_sqlite.h SOURCES += drivers/sqlite/qsql_sqlite.cpp } commit c24f1ac5a184d25b137a3a66b3f6f4d123de4bbd Author: Mark Brand Date: Wed Jul 7 12:05:36 2010 +0200 Consolidate sql driver configuration redundancy Previously sql driver recipes each appeared in both the plugin pro file and src/sql/drivers/drivers.pri for building into QtSql. Split driver recipes into shared pri files. Also split bundled 3rd party sqlite code recipe into a shared pri. Merge-request: 715 Reviewed-by: Oswald Buddenhagen (cherry picked from commit d7557de99b38031906c17c54496cb76a13dec5f7) diff --git a/src/3rdparty/sqlite.pri b/src/3rdparty/sqlite.pri new file mode 100644 index 0000000..575412d --- /dev/null +++ b/src/3rdparty/sqlite.pri @@ -0,0 +1,4 @@ +CONFIG(release, debug|release):DEFINES *= NDEBUG +DEFINES += SQLITE_OMIT_LOAD_EXTENSION SQLITE_OMIT_COMPLETE +INCLUDEPATH += $$PWD/sqlite +SOURCES += $$PWD/sqlite/sqlite3.c diff --git a/src/plugins/sqldrivers/db2/db2.pro b/src/plugins/sqldrivers/db2/db2.pro index 25ca499..e053f37 100644 --- a/src/plugins/sqldrivers/db2/db2.pro +++ b/src/plugins/sqldrivers/db2/db2.pro @@ -1,10 +1,6 @@ TARGET = qsqldb2 -HEADERS = ../../../sql/drivers/db2/qsql_db2.h -SOURCES = main.cpp \ - ../../../sql/drivers/db2/qsql_db2.cpp - -unix:!contains( LIBS, .*db2.* ):LIBS *= -ldb2 -win32:!contains( LIBS, .*db2.* ):LIBS *= -ldb2cli +SOURCES = main.cpp +include(../../../sql/drivers/db2/qsql_db2.pri) include(../qsqldriverbase.pri) diff --git a/src/plugins/sqldrivers/ibase/ibase.pro b/src/plugins/sqldrivers/ibase/ibase.pro index bb73adb..7870ec8 100644 --- a/src/plugins/sqldrivers/ibase/ibase.pro +++ b/src/plugins/sqldrivers/ibase/ibase.pro @@ -1,14 +1,6 @@ TARGET = qsqlibase -HEADERS = ../../../sql/drivers/ibase/qsql_ibase.h -SOURCES = main.cpp \ - ../../../sql/drivers/ibase/qsql_ibase.cpp - -unix:!contains( LIBS, .*gds.* ):!contains( LIBS, .*libfb.* ):LIBS *= -lgds - -win32:!contains( LIBS, .*gds.* ):!contains( LIBS, .*fbclient.* ) { - !win32-borland:LIBS *= -lgds32_ms - win32-borland:LIBS += gds32.lib -} +SOURCES = main.cpp +include(../../../sql/drivers/ibase/qsql_ibase.pri) include(../qsqldriverbase.pri) diff --git a/src/plugins/sqldrivers/mysql/mysql.pro b/src/plugins/sqldrivers/mysql/mysql.pro index b808c8e..b6d42ff 100644 --- a/src/plugins/sqldrivers/mysql/mysql.pro +++ b/src/plugins/sqldrivers/mysql/mysql.pro @@ -1,23 +1,6 @@ TARGET = qsqlmysql -HEADERS = ../../../sql/drivers/mysql/qsql_mysql.h -SOURCES = main.cpp \ - ../../../sql/drivers/mysql/qsql_mysql.cpp - -unix: { - isEmpty(QT_LFLAGS_MYSQL) { - !contains(LIBS, .*mysqlclient.*):!contains(LIBS, .*mysqld.*) { - use_libmysqlclient_r:LIBS *= -lmysqlclient_r - else:LIBS *= -lmysqlclient - } - } else { - LIBS *= $$QT_LFLAGS_MYSQL - QMAKE_CXXFLAGS *= $$QT_CFLAGS_MYSQL - } -} - -win32:!contains(LIBS, .*mysql.*):!contains(LIBS, .*mysqld.*) { - LIBS *= -llibmysql -} +SOURCES = main.cpp +include(../../../sql/drivers/mysql/qsql_mysql.pri) include(../qsqldriverbase.pri) diff --git a/src/plugins/sqldrivers/oci/oci.pro b/src/plugins/sqldrivers/oci/oci.pro index d75827e..d7dcce9 100644 --- a/src/plugins/sqldrivers/oci/oci.pro +++ b/src/plugins/sqldrivers/oci/oci.pro @@ -1,13 +1,6 @@ TARGET = qsqloci -HEADERS = ../../../sql/drivers/oci/qsql_oci.h -SOURCES = main.cpp \ - ../../../sql/drivers/oci/qsql_oci.cpp - -win32:LIBS *= -loci - -unix:!contains( LIBS, .*clnts.* ):LIBS *= -lclntsh - -macx:QMAKE_LFLAGS += -Wl,-flat_namespace,-U,_environ +SOURCES = main.cpp +include(../../../sql/drivers/oci/qsql_oci.pri) include(../qsqldriverbase.pri) diff --git a/src/plugins/sqldrivers/odbc/odbc.pro b/src/plugins/sqldrivers/odbc/odbc.pro index 70070db..677eb6e 100644 --- a/src/plugins/sqldrivers/odbc/odbc.pro +++ b/src/plugins/sqldrivers/odbc/odbc.pro @@ -1,19 +1,6 @@ TARGET = qsqlodbc -HEADERS = ../../../sql/drivers/odbc/qsql_odbc.h -SOURCES = main.cpp \ - ../../../sql/drivers/odbc/qsql_odbc.cpp - -unix { - !contains( LIBS, .*odbc.* ) { - LIBS *= $$QT_LFLAGS_ODBC - } - DEFINES += UNICODE -} - -win32 { - !win32-borland:LIBS *= -lodbc32 - win32-borland:LIBS *= $(BCB)/lib/PSDK/odbc32.lib -} +SOURCES = main.cpp +include(../../../sql/drivers/odbc/qsql_odbc.pri) include(../qsqldriverbase.pri) diff --git a/src/plugins/sqldrivers/psql/psql.pro b/src/plugins/sqldrivers/psql/psql.pro index 9586695..8276c0a 100644 --- a/src/plugins/sqldrivers/psql/psql.pro +++ b/src/plugins/sqldrivers/psql/psql.pro @@ -1,18 +1,6 @@ TARGET = qsqlpsql -HEADERS = ../../../sql/drivers/psql/qsql_psql.h -SOURCES = main.cpp \ - ../../../sql/drivers/psql/qsql_psql.cpp - -unix|win32-g++*: { - !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 -lws2_32 -ladvapi32 +SOURCES = main.cpp +include(../../../sql/drivers/psql/qsql_psql.pri) include(../qsqldriverbase.pri) diff --git a/src/plugins/sqldrivers/sqlite/sqlite.pro b/src/plugins/sqldrivers/sqlite/sqlite.pro index 75f04b9..f4c1671 100644 --- a/src/plugins/sqldrivers/sqlite/sqlite.pro +++ b/src/plugins/sqldrivers/sqlite/sqlite.pro @@ -1,18 +1,7 @@ TARGET = qsqlite -HEADERS = ../../../sql/drivers/sqlite/qsql_sqlite.h -SOURCES = smain.cpp \ - ../../../sql/drivers/sqlite/qsql_sqlite.cpp - -!system-sqlite:!contains( LIBS, .*sqlite.* ) { - CONFIG(release, debug|release):DEFINES *= NDEBUG - DEFINES += SQLITE_OMIT_LOAD_EXTENSION SQLITE_OMIT_COMPLETE - INCLUDEPATH += ../../../3rdparty/sqlite - SOURCES += ../../../3rdparty/sqlite/sqlite3.c -} else { - LIBS *= $$QT_LFLAGS_SQLITE - QMAKE_CXXFLAGS *= $$QT_CFLAGS_SQLITE -} +SOURCES = smain.cpp +include(../../../sql/drivers/sqlite/qsql_sqlite.pri) wince*: DEFINES += HAVE_LOCALTIME_S=0 diff --git a/src/plugins/sqldrivers/sqlite2/sqlite2.pro b/src/plugins/sqldrivers/sqlite2/sqlite2.pro index 0f6c19a..e6197b9 100644 --- a/src/plugins/sqldrivers/sqlite2/sqlite2.pro +++ b/src/plugins/sqldrivers/sqlite2/sqlite2.pro @@ -1,9 +1,6 @@ TARGET = qsqlite2 -HEADERS = ../../../sql/drivers/sqlite2/qsql_sqlite2.h -SOURCES = smain.cpp \ - ../../../sql/drivers/sqlite2/qsql_sqlite2.cpp - -!contains(LIBS, .*sqlite.*):LIBS *= -lsqlite +SOURCES = smain.cpp +include(../../../sql/drivers/sqlite2/qsql_sqlite2.pri) include(../qsqldriverbase.pri) diff --git a/src/plugins/sqldrivers/tds/tds.pro b/src/plugins/sqldrivers/tds/tds.pro index ba40be5..b8e8ded 100644 --- a/src/plugins/sqldrivers/tds/tds.pro +++ b/src/plugins/sqldrivers/tds/tds.pro @@ -1,15 +1,6 @@ TARGET = qsqltds -HEADERS = ../../../sql/drivers/tds/qsql_tds.h - -SOURCES = main.cpp \ - ../../../sql/drivers/tds/qsql_tds.cpp - -unix:!contains( LIBS, .*sybdb.* ):LIBS *= -lsybdb - -win32 { - !win32-borland:LIBS *= -lNTWDBLIB - win32-borland:LIBS *= $(BCB)/lib/PSDK/NTWDBLIB.LIB -} +SOURCES = main.cpp +include(../../../sql/drivers/tds/qsql_tds.pri) include(../qsqldriverbase.pri) diff --git a/src/sql/drivers/db2/qsql_db2.pri b/src/sql/drivers/db2/qsql_db2.pri new file mode 100644 index 0000000..e53a8a0 --- /dev/null +++ b/src/sql/drivers/db2/qsql_db2.pri @@ -0,0 +1,8 @@ +HEADERS += $$PWD/qsql_db2.h +SOURCES += $$PWD/qsql_db2.cpp + +unix { + !contains(LIBS, .*db2.*):LIBS *= -ldb2 +} else:!win32-borland { + !contains(LIBS, .*db2.*):LIBS *= -ldb2cli +} diff --git a/src/sql/drivers/drivers.pri b/src/sql/drivers/drivers.pri index 05e7265..3af5525 100644 --- a/src/sql/drivers/drivers.pri +++ b/src/sql/drivers/drivers.pri @@ -1,119 +1,11 @@ -contains(sql-drivers, all ) { - sql-driver += psql mysql odbc oci tds db2 sqlite ibase -} - -contains(sql-drivers, psql) { - HEADERS += drivers/psql/qsql_psql.h - SOURCES += drivers/psql/qsql_psql.cpp - - 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 - } else:win32:!contains(LIBS, .*pq.* ) LIBS *= -llibpq -lws2_32 -ladvapi32 -} - -contains(sql-drivers, mysql) { - HEADERS += drivers/mysql/qsql_mysql.h - SOURCES += drivers/mysql/qsql_mysql.cpp - - unix { - isEmpty(QT_LFLAGS_MYSQL) { - !contains(LIBS, .*mysqlclient.*):!contains(LIBS, .*mysqld.*) { - use_libmysqlclient_r:LIBS *= -lmysqlclient_r - else:LIBS *= -lmysqlclient - } - } else { - LIBS *= $$QT_LFLAGS_MYSQL - QMAKE_CXXFLAGS *= $$QT_CFLAGS_MYSQL - } - } - - win32:!contains(LIBS, .*mysql.*):!contains(LIBS, .*mysqld.*) { - !win32-g++*:LIBS *= -llibmysql - else:LIBS *= -lmysql - } -} - -contains(sql-drivers, odbc) { - HEADERS += drivers/odbc/qsql_odbc.h - SOURCES += drivers/odbc/qsql_odbc.cpp - - mac:!contains( LIBS, .*odbc.* ):LIBS *= -liodbc - unix:!contains( LIBS, .*odbc.* ):LIBS *= -lodbc - unix:DEFINES += UNICODE - - win32 { - !win32-borland:LIBS *= -lodbc32 - else:LIBS *= $(BCB)/lib/PSDK/odbc32.lib - } -} - -contains(sql-drivers, oci) { - HEADERS += drivers/oci/qsql_oci.h - SOURCES += drivers/oci/qsql_oci.cpp - - unix:!contains( LIBS, .*clnts.* ):LIBS += -lclntsh - - win32:LIBS += -loci -} - -contains(sql-drivers, tds) { - HEADERS += drivers/tds/qsql_tds.h - SOURCES += drivers/tds/qsql_tds.cpp - - unix:LIBS += -L$SYBASE/lib -lsybdb - - win32 { - !win32-borland:LIBS += -lNTWDBLIB - else:LIBS += $(BCB)/lib/PSDK/NTWDBLIB.LIB - } -} - -contains(sql-drivers, db2) { - HEADERS += drivers/db2/qsql_db2.h - SOURCES += drivers/db2/qsql_db2.cpp - - unix:LIBS += -ldb2 - - win32 { - !win32-borland:LIBS += -ldb2cli -# else:LIBS += $(BCB)/lib/PSDK/db2cli.lib - } -} - -contains(sql-drivers, ibase) { - HEADERS += drivers/ibase/qsql_ibase.h - SOURCES += drivers/ibase/qsql_ibase.cpp - - unix:LIBS *= -lgds - - win32 { - !win32-borland:LIBS *= -lgds32_ms - else:LIBS += gds32.lib - } -} - -contains(sql-drivers, sqlite2) { - HEADERS += drivers/sqlite2/qsql_sqlite2.h - SOURCES += drivers/sqlite2/qsql_sqlite2.cpp - !contains(LIBS, .*sqlite.*):LIBS *= -lsqlite -} - -contains(sql-drivers, sqlite) { - !system-sqlite:!contains( LIBS, .*sqlite3.* ) { - CONFIG(release, debug|release):DEFINES *= NDEBUG - DEFINES += SQLITE_OMIT_LOAD_EXTENSION SQLITE_OMIT_COMPLETE - INCLUDEPATH += ../3rdparty/sqlite - SOURCES += ../3rdparty/sqlite/sqlite3.c - } else { - LIBS *= $$QT_LFLAGS_SQLITE - QMAKE_CXXFLAGS *= $$QT_CFLAGS_SQLITE - } - - HEADERS += drivers/sqlite/qsql_sqlite.h - SOURCES += drivers/sqlite/qsql_sqlite.cpp -} +contains(sql-drivers, all):sql-driver += psql mysql odbc oci tds db2 sqlite ibase + +contains(sql-drivers, psql):include($$PWD/sqlite/qsql_psql.pri) +contains(sql-drivers, mysql):include($$PWD/mysql/qsql_mysql.pri) +contains(sql-drivers, odbc):include($$PWD/odbc/qsql_odbc.pri) +contains(sql-drivers, oci):include($$PWD/oci/qsql_oci.pri) +contains(sql-drivers, tds):include($$PWD/tds/qsql_tds.pri) +contains(sql-drivers, db2):include($$PWD/db2/qsql_db2.pri) +contains(sql-drivers, ibase):include($$PWD/db2/qsql_ibase.pri) +contains(sql-drivers, sqlite2):include($$PWD/sqlite2/qsql_sqlite2.pri) +contains(sql-drivers, sqlite):include($$PWD/sqlite/qsql_sqlite.pri) diff --git a/src/sql/drivers/ibase/qsql_ibase.pri b/src/sql/drivers/ibase/qsql_ibase.pri new file mode 100644 index 0000000..ebcd18a --- /dev/null +++ b/src/sql/drivers/ibase/qsql_ibase.pri @@ -0,0 +1,11 @@ +HEADERS += $$PWD/qsql_ibase.h +SOURCES += $$PWD/qsql_ibase.cpp + +unix { + !contains(LIBS, .*gds.*):!contains(LIBS, .*libfb.*):LIBS *= -lgds +} else { + !contains(LIBS, .*gds.*):!contains(LIBS, .*fbclient.*) { + win32-borland:LIBS += gds32.lib + else:LIBS *= -lgds32_ms + } +} diff --git a/src/sql/drivers/mysql/qsql_mysql.pri b/src/sql/drivers/mysql/qsql_mysql.pri new file mode 100644 index 0000000..801b891 --- /dev/null +++ b/src/sql/drivers/mysql/qsql_mysql.pri @@ -0,0 +1,16 @@ +HEADERS += $$PWD/qsql_mysql.h +SOURCES += $$PWD/qsql_mysql.cpp + +unix { + isEmpty(QT_LFLAGS_MYSQL) { + !contains(LIBS, .*mysqlclient.*):!contains(LIBS, .*mysqld.*) { + use_libmysqlclient_r:LIBS *= -lmysqlclient_r + else:LIBS *= -lmysqlclient + } + } else { + LIBS *= $$QT_LFLAGS_MYSQL + QMAKE_CXXFLAGS *= $$QT_CFLAGS_MYSQL + } +} else { + !contains(LIBS, .*mysql.*):!contains(LIBS, .*mysqld.*):LIBS *= -llibmysql +} diff --git a/src/sql/drivers/oci/qsql_oci.pri b/src/sql/drivers/oci/qsql_oci.pri new file mode 100644 index 0000000..6859156 --- /dev/null +++ b/src/sql/drivers/oci/qsql_oci.pri @@ -0,0 +1,9 @@ +HEADERS += $$PWD/qsql_oci.h +SOURCES += $$PWD/qsql_oci.cpp + +unix { + !contains(LIBS, .*clnts.*):LIBS *= -lclntsh +} else { + LIBS *= -loci +} +macx:QMAKE_LFLAGS += -Wl,-flat_namespace,-U,_environ diff --git a/src/sql/drivers/odbc/qsql_odbc.pri b/src/sql/drivers/odbc/qsql_odbc.pri new file mode 100644 index 0000000..c4c92be --- /dev/null +++ b/src/sql/drivers/odbc/qsql_odbc.pri @@ -0,0 +1,13 @@ +HEADERS += $$PWD/qsql_odbc.h +SOURCES += $$PWD/qsql_odbc.cpp + +mac { + !contains(LIBS, .*odbc.*):LIBS *= -liodbc +} else:unix { + DEFINES += UNICODE + !contains(LIBS, .*odbc.*):LIBS *= $$QT_LFLAGS_ODBC +} else:win32-borland { + LIBS *= $(BCB)/lib/PSDK/odbc32.lib +} else { + LIBS *= -lodbc32 +} diff --git a/src/sql/drivers/psql/qsql_psql.pri b/src/sql/drivers/psql/qsql_psql.pri new file mode 100644 index 0000000..c282d57 --- /dev/null +++ b/src/sql/drivers/psql/qsql_psql.pri @@ -0,0 +1,13 @@ +HEADERS += $$PWD/qsql_psql.h +SOURCES += $$PWD/qsql_psql.cpp + +unix|win32-g++* { + !static:!isEmpty(QT_LFLAGS_PSQL) { + !contains(QT_CONFIG, system-zlib): QT_LFLAGS_PSQL -= -lz + LIBS *= $$QT_LFLAGS_PSQL + QMAKE_CXXFLAGS *= $$QT_CFLAGS_PSQL + } + !contains(LIBS, .*pq.*):LIBS *= -lpq +} else { + !contains(LIBS, .*pq.*):LIBS *= -llibpq -lws2_32 -ladvapi32 +} diff --git a/src/sql/drivers/sqlite/qsql_sqlite.pri b/src/sql/drivers/sqlite/qsql_sqlite.pri new file mode 100644 index 0000000..7ad5936 --- /dev/null +++ b/src/sql/drivers/sqlite/qsql_sqlite.pri @@ -0,0 +1,9 @@ +HEADERS += $$PWD/qsql_sqlite.h +SOURCES += $$PWD/qsql_sqlite.cpp + +!system-sqlite:!contains(LIBS, .*sqlite3.*) { + include($$PWD/../../../3rdparty/sqlite.pri) +} else { + LIBS *= $$QT_LFLAGS_SQLITE + QMAKE_CXXFLAGS *= $$QT_CFLAGS_SQLITE +} diff --git a/src/sql/drivers/sqlite2/qsql_sqlite2.pri b/src/sql/drivers/sqlite2/qsql_sqlite2.pri new file mode 100644 index 0000000..9f0e807 --- /dev/null +++ b/src/sql/drivers/sqlite2/qsql_sqlite2.pri @@ -0,0 +1,4 @@ +HEADERS += $PWD/qsql_sqlite2.h +SOURCES += $PWD/qsql_sqlite2.cpp + +!contains(LIBS, .*sqlite.*):LIBS *= -lsqlite diff --git a/src/sql/drivers/tds/qsql_tds.pri b/src/sql/drivers/tds/qsql_tds.pri new file mode 100644 index 0000000..e2662ca --- /dev/null +++ b/src/sql/drivers/tds/qsql_tds.pri @@ -0,0 +1,10 @@ +HEADERS += $$PWD/qsql_tds.h +SOURCES += $$PWD/qsql_tds.cpp + +unix { + !contains(LIBS, .*sybdb.*):LIBS *= -lsybdb +} else:win32-borland { + LIBS *= $(BCB)/lib/PSDK/NTWDBLIB.LIB +} else { + LIBS *= -lNTWDBLIB +} commit f32bbfe1b713dacac6ee9b4d6ebb4561a2ca92c3 Author: Mark Brand Date: Wed Jul 7 12:05:37 2010 +0200 Simplify *= to += after contains() test Merge-request: 715 Reviewed-by: Oswald Buddenhagen (cherry picked from commit 484c05ef374ef1c1043836b074693838d6b30adb) diff --git a/src/sql/drivers/db2/qsql_db2.pri b/src/sql/drivers/db2/qsql_db2.pri index e53a8a0..16557f0 100644 --- a/src/sql/drivers/db2/qsql_db2.pri +++ b/src/sql/drivers/db2/qsql_db2.pri @@ -2,7 +2,7 @@ HEADERS += $$PWD/qsql_db2.h SOURCES += $$PWD/qsql_db2.cpp unix { - !contains(LIBS, .*db2.*):LIBS *= -ldb2 + !contains(LIBS, .*db2.*):LIBS += -ldb2 } else:!win32-borland { - !contains(LIBS, .*db2.*):LIBS *= -ldb2cli + !contains(LIBS, .*db2.*):LIBS += -ldb2cli } diff --git a/src/sql/drivers/ibase/qsql_ibase.pri b/src/sql/drivers/ibase/qsql_ibase.pri index ebcd18a..33fbb0d 100644 --- a/src/sql/drivers/ibase/qsql_ibase.pri +++ b/src/sql/drivers/ibase/qsql_ibase.pri @@ -2,10 +2,10 @@ HEADERS += $$PWD/qsql_ibase.h SOURCES += $$PWD/qsql_ibase.cpp unix { - !contains(LIBS, .*gds.*):!contains(LIBS, .*libfb.*):LIBS *= -lgds + !contains(LIBS, .*gds.*):!contains(LIBS, .*libfb.*):LIBS += -lgds } else { !contains(LIBS, .*gds.*):!contains(LIBS, .*fbclient.*) { win32-borland:LIBS += gds32.lib - else:LIBS *= -lgds32_ms + else:LIBS += -lgds32_ms } } diff --git a/src/sql/drivers/mysql/qsql_mysql.pri b/src/sql/drivers/mysql/qsql_mysql.pri index 801b891..1b9c3dd 100644 --- a/src/sql/drivers/mysql/qsql_mysql.pri +++ b/src/sql/drivers/mysql/qsql_mysql.pri @@ -4,13 +4,13 @@ SOURCES += $$PWD/qsql_mysql.cpp unix { isEmpty(QT_LFLAGS_MYSQL) { !contains(LIBS, .*mysqlclient.*):!contains(LIBS, .*mysqld.*) { - use_libmysqlclient_r:LIBS *= -lmysqlclient_r - else:LIBS *= -lmysqlclient + use_libmysqlclient_r:LIBS += -lmysqlclient_r + else:LIBS += -lmysqlclient } } else { LIBS *= $$QT_LFLAGS_MYSQL QMAKE_CXXFLAGS *= $$QT_CFLAGS_MYSQL } } else { - !contains(LIBS, .*mysql.*):!contains(LIBS, .*mysqld.*):LIBS *= -llibmysql + !contains(LIBS, .*mysql.*):!contains(LIBS, .*mysqld.*):LIBS += -llibmysql } diff --git a/src/sql/drivers/oci/qsql_oci.pri b/src/sql/drivers/oci/qsql_oci.pri index 6859156..60ccc4c 100644 --- a/src/sql/drivers/oci/qsql_oci.pri +++ b/src/sql/drivers/oci/qsql_oci.pri @@ -2,7 +2,7 @@ HEADERS += $$PWD/qsql_oci.h SOURCES += $$PWD/qsql_oci.cpp unix { - !contains(LIBS, .*clnts.*):LIBS *= -lclntsh + !contains(LIBS, .*clnts.*):LIBS += -lclntsh } else { LIBS *= -loci } diff --git a/src/sql/drivers/odbc/qsql_odbc.pri b/src/sql/drivers/odbc/qsql_odbc.pri index c4c92be..8394012 100644 --- a/src/sql/drivers/odbc/qsql_odbc.pri +++ b/src/sql/drivers/odbc/qsql_odbc.pri @@ -2,10 +2,10 @@ HEADERS += $$PWD/qsql_odbc.h SOURCES += $$PWD/qsql_odbc.cpp mac { - !contains(LIBS, .*odbc.*):LIBS *= -liodbc + !contains(LIBS, .*odbc.*):LIBS += -liodbc } else:unix { DEFINES += UNICODE - !contains(LIBS, .*odbc.*):LIBS *= $$QT_LFLAGS_ODBC + !contains(LIBS, .*odbc.*):LIBS += $$QT_LFLAGS_ODBC } else:win32-borland { LIBS *= $(BCB)/lib/PSDK/odbc32.lib } else { diff --git a/src/sql/drivers/psql/qsql_psql.pri b/src/sql/drivers/psql/qsql_psql.pri index c282d57..97db4be 100644 --- a/src/sql/drivers/psql/qsql_psql.pri +++ b/src/sql/drivers/psql/qsql_psql.pri @@ -7,7 +7,7 @@ unix|win32-g++* { LIBS *= $$QT_LFLAGS_PSQL QMAKE_CXXFLAGS *= $$QT_CFLAGS_PSQL } - !contains(LIBS, .*pq.*):LIBS *= -lpq + !contains(LIBS, .*pq.*):LIBS += -lpq } else { - !contains(LIBS, .*pq.*):LIBS *= -llibpq -lws2_32 -ladvapi32 + !contains(LIBS, .*pq.*):LIBS += -llibpq -lws2_32 -ladvapi32 } diff --git a/src/sql/drivers/sqlite2/qsql_sqlite2.pri b/src/sql/drivers/sqlite2/qsql_sqlite2.pri index 9f0e807..76fe255 100644 --- a/src/sql/drivers/sqlite2/qsql_sqlite2.pri +++ b/src/sql/drivers/sqlite2/qsql_sqlite2.pri @@ -1,4 +1,4 @@ HEADERS += $PWD/qsql_sqlite2.h SOURCES += $PWD/qsql_sqlite2.cpp -!contains(LIBS, .*sqlite.*):LIBS *= -lsqlite +!contains(LIBS, .*sqlite.*):LIBS += -lsqlite diff --git a/src/sql/drivers/tds/qsql_tds.pri b/src/sql/drivers/tds/qsql_tds.pri index e2662ca..c552ead 100644 --- a/src/sql/drivers/tds/qsql_tds.pri +++ b/src/sql/drivers/tds/qsql_tds.pri @@ -2,7 +2,7 @@ HEADERS += $$PWD/qsql_tds.h SOURCES += $$PWD/qsql_tds.cpp unix { - !contains(LIBS, .*sybdb.*):LIBS *= -lsybdb + !contains(LIBS, .*sybdb.*):LIBS += -lsybdb } else:win32-borland { LIBS *= $(BCB)/lib/PSDK/NTWDBLIB.LIB } else { commit 72f49a70bb5a719e161aeceea986aac116c270d7 Author: Mark Brand Date: Thu Jul 8 15:28:24 2010 +0200 Corrected paths Merge-request: 715 Reviewed-by: Oswald Buddenhagen (cherry picked from commit c69dc51e5e03aaa87a9385f5557a4f6b8aaeded3) diff --git a/src/sql/drivers/drivers.pri b/src/sql/drivers/drivers.pri index 3af5525..87cc0b1 100644 --- a/src/sql/drivers/drivers.pri +++ b/src/sql/drivers/drivers.pri @@ -1,11 +1,11 @@ contains(sql-drivers, all):sql-driver += psql mysql odbc oci tds db2 sqlite ibase -contains(sql-drivers, psql):include($$PWD/sqlite/qsql_psql.pri) +contains(sql-drivers, psql):include($$PWD/psql/qsql_psql.pri) contains(sql-drivers, mysql):include($$PWD/mysql/qsql_mysql.pri) contains(sql-drivers, odbc):include($$PWD/odbc/qsql_odbc.pri) contains(sql-drivers, oci):include($$PWD/oci/qsql_oci.pri) contains(sql-drivers, tds):include($$PWD/tds/qsql_tds.pri) contains(sql-drivers, db2):include($$PWD/db2/qsql_db2.pri) -contains(sql-drivers, ibase):include($$PWD/db2/qsql_ibase.pri) +contains(sql-drivers, ibase):include($$PWD/ibase/qsql_ibase.pri) contains(sql-drivers, sqlite2):include($$PWD/sqlite2/qsql_sqlite2.pri) contains(sql-drivers, sqlite):include($$PWD/sqlite/qsql_sqlite.pri) commit cc8386f6a7781ece721e9700ba2c290bb14c0d7d Author: Mark Brand Date: Thu Jul 29 11:15:00 2010 +0200 fixes for using freetds DBNTWIN32 only if not Q_USE_SYBASE. Workaround for RETCODE typedef conflict between ODBC and FreeTDS. Include winsock2.h supplies SOCKET for FreeTDS. Merge-request: 684 Reviewed-by: Oswald Buddenhagen (cherry picked from commit 3643d21756a6bd9ed06a409457d6e8c93aba3b43) diff --git a/src/sql/drivers/tds/qsql_tds.h b/src/sql/drivers/tds/qsql_tds.h index f23a672..3594a4d 100644 --- a/src/sql/drivers/tds/qsql_tds.h +++ b/src/sql/drivers/tds/qsql_tds.h @@ -48,7 +48,10 @@ #ifdef Q_OS_WIN32 #define WIN32_LEAN_AND_MEAN +#ifndef Q_USE_SYBASE #define DBNTWIN32 // indicates 32bit windows dblib +#endif +#include #include #include #include diff --git a/src/sql/kernel/qsqldatabase.cpp b/src/sql/kernel/qsqldatabase.cpp index 76bc2b0..2ab37de 100644 --- a/src/sql/kernel/qsqldatabase.cpp +++ b/src/sql/kernel/qsqldatabase.cpp @@ -60,7 +60,10 @@ #include "../drivers/oci/qsql_oci.h" #endif #ifdef QT_SQL_TDS +// conflicting RETCODE typedef between odbc and freetds +#define RETCODE DBRETCODE #include "../drivers/tds/qsql_tds.h" +#undef RETCODE #endif #ifdef QT_SQL_DB2 #include "../drivers/db2/qsql_db2.h" commit 0da5d326ddf55bc47f8dfa13572405706d96029f Author: Mark Brand Date: Tue Aug 3 16:37:05 2010 +0200 Improve TDS configuration through QT_LFLAGS_TDS, SYBASE, SYBASE_LIBS Consistent with QT_LFLAGS_* for other database drivers. Support added to configure shell script and configure.exe. Respect SYBASE and SYBASE_LIBS. Use QT_LFLAGS_TDS in project files. Merge-request: 2416 Reviewed-by: Oswald Buddenhagen (cherry picked from commit 2c7621730d30ac418874c18036a7aa34e2aae1d0) diff --git a/configure b/configure index 05633fa..e6b9476 100755 --- a/configure +++ b/configure @@ -818,6 +818,7 @@ QT_LFLAGS_MYSQL_R= QT_CFLAGS_SQLITE= QT_LFLAGS_SQLITE= QT_LFLAGS_ODBC="-lodbc" +QT_LFLAGS_TDS= # flags for libdbus-1 QT_CFLAGS_DBUS= @@ -4990,7 +4991,9 @@ for _SQLDR in $CFG_SQL_AVAILABLE; do ;; tds) if [ "$CFG_SQL_tds" != "no" ]; then - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/tds "TDS" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then + [ -z "$SYBASE" ] || QT_LFLAGS_TDS="-L$SYBASE/lib" + [ -z "$SYBASE_LIBS" ] || QT_LFLAGS_TDS="$QT_LFLAGS_TDS $SYBASE_LIBS" + if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/tds "TDS" $QT_LFLAGS_TDS $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then if [ "$CFG_SQL_tds" = "auto" ]; then CFG_SQL_tds=plugin fi @@ -7786,6 +7789,9 @@ fi if [ -n "$QT_LFLAGS_ODBC" ]; then echo "QT_LFLAGS_ODBC = $QT_LFLAGS_ODBC" >> "$CACHEFILE.tmp" fi +if [ -n "$QT_LFLAGS_TDS" ]; then + echo "QT_LFLAGS_TDS = $QT_LFLAGS_TDS" >> "$CACHEFILE.tmp" +fi if [ "$QT_EDITION" != "QT_EDITION_OPENSOURCE" ]; then echo "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" >> "$CACHEFILE.tmp" diff --git a/src/sql/drivers/tds/qsql_tds.pri b/src/sql/drivers/tds/qsql_tds.pri index c552ead..037f793 100644 --- a/src/sql/drivers/tds/qsql_tds.pri +++ b/src/sql/drivers/tds/qsql_tds.pri @@ -1,8 +1,10 @@ HEADERS += $$PWD/qsql_tds.h SOURCES += $$PWD/qsql_tds.cpp -unix { +unix|win32-g++: { + !isEmpty(QT_LFLAGS_TDS):!static:LIBS *= $$QT_LFLAGS_TDS !contains(LIBS, .*sybdb.*):LIBS += -lsybdb + QMAKE_CXXFLAGS *= $$QT_CFLAGS_TDS } else:win32-borland { LIBS *= $(BCB)/lib/PSDK/NTWDBLIB.LIB } else { diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index f7dac93..c7e6c16 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -1029,6 +1029,10 @@ void Configure::parseCmdLine() opensslLibs = configCmdLine.at(i); } else if (configCmdLine.at(i).startsWith("PSQL_LIBS=")) { psqlLibs = configCmdLine.at(i); + } else if (configCmdLine.at(i).startsWith("SYBASE=")) { + sybase = configCmdLine.at(i); + } else if (configCmdLine.at(i).startsWith("SYBASE_LIBS=")) { + sybaseLibs = configCmdLine.at(i); } else if ((configCmdLine.at(i) == "-override-version") || (configCmdLine.at(i) == "-version-override")){ @@ -2747,6 +2751,17 @@ void Configure::generateOutputVars() } if (!psqlLibs.isEmpty()) qmakeVars += QString("QT_LFLAGS_PSQL=") + psqlLibs.section("=", 1); + + { + QStringList lflagsTDS; + if (!sybase.isEmpty()) + lflagsTDS += QString("-L") + fixSeparators(sybase.section("=", 1) + "/lib"); + if (!sybaseLibs.isEmpty()) + lflagsTDS += sybaseLibs.section("=", 1); + if (!lflagsTDS.isEmpty()) + qmakeVars += QString("QT_LFLAGS_TDS=") + lflagsTDS.join(" "); + } + if (!qmakeSql.isEmpty()) qmakeVars += QString("sql-drivers += ") + qmakeSql.join(" "); if (!qmakeSqlPlugins.isEmpty()) diff --git a/tools/configure/configureapp.h b/tools/configure/configureapp.h index ff2ee8b..b3c07f7 100644 --- a/tools/configure/configureapp.h +++ b/tools/configure/configureapp.h @@ -134,6 +134,8 @@ private: QStringList qmakeLibs; QString opensslLibs; QString psqlLibs; + QString sybase; + QString sybaseLibs; QMap licenseInfo; QString outputLine; commit 8479bf5654d117322fdb7264b82f7fa9303da9aa Author: Mark Brand Date: Tue Aug 24 14:28:42 2010 +0200 scope fixes and clutter reduction for sql driver projects Add missing wildcard to scope where meant to include all win32-g++ targets. There is no reason to ignore QT_LFLAGS_TDS and QT_LFLAGS_PSQL in static builds. Via LIBS these may end up in QMAKE_PRL_LIBS in QtSql.prl. Also, the isEmpty() tests on these is redundant and only wastes time. Processing of QT_CFLAGS_PSQL should not depend on QT_LFLAGS_PSQL. It no longer seems appropriate to clean up "-lz" here in case of zlib bundled in QtCore. It's reasonable to expect QT_LFLAGS_PSQL to be ready after configure. (cherry picked from commit f1ceaaf96bc658e04f83fd909ad93d1a4d0a2290) diff --git a/src/sql/drivers/psql/qsql_psql.pri b/src/sql/drivers/psql/qsql_psql.pri index 97db4be..6da3540 100644 --- a/src/sql/drivers/psql/qsql_psql.pri +++ b/src/sql/drivers/psql/qsql_psql.pri @@ -2,12 +2,9 @@ HEADERS += $$PWD/qsql_psql.h SOURCES += $$PWD/qsql_psql.cpp unix|win32-g++* { - !static:!isEmpty(QT_LFLAGS_PSQL) { - !contains(QT_CONFIG, system-zlib): QT_LFLAGS_PSQL -= -lz - LIBS *= $$QT_LFLAGS_PSQL - QMAKE_CXXFLAGS *= $$QT_CFLAGS_PSQL - } + LIBS *= $$QT_LFLAGS_PSQL !contains(LIBS, .*pq.*):LIBS += -lpq + QMAKE_CXXFLAGS *= $$QT_CFLAGS_PSQL } else { !contains(LIBS, .*pq.*):LIBS += -llibpq -lws2_32 -ladvapi32 } diff --git a/src/sql/drivers/tds/qsql_tds.pri b/src/sql/drivers/tds/qsql_tds.pri index 037f793..521c06b 100644 --- a/src/sql/drivers/tds/qsql_tds.pri +++ b/src/sql/drivers/tds/qsql_tds.pri @@ -1,8 +1,8 @@ HEADERS += $$PWD/qsql_tds.h SOURCES += $$PWD/qsql_tds.cpp -unix|win32-g++: { - !isEmpty(QT_LFLAGS_TDS):!static:LIBS *= $$QT_LFLAGS_TDS +unix|win32-g++*: { + LIBS *= $$QT_LFLAGS_TDS !contains(LIBS, .*sybdb.*):LIBS += -lsybdb QMAKE_CXXFLAGS *= $$QT_CFLAGS_TDS } else:win32-borland { commit 6e4d951c781925dc24dedc905c63f7a7aa325d1d Author: Mark Brand Date: Mon Aug 30 10:27:12 2010 +0200 fix MinGW cross compilation with -debug-and-release Fixed two issues in the configure script that prevented -debug-and-release from working correctly: We now allow dual debug and release mode for MinGW. We follow configure.exe in *not* settting PRECOMPILED_DIR. This gives qmake the freedom to put the debug and release precompiled headers in separate directories. Merge-request: 794 Reviewed-by: Oswald Buddenhagen (cherry picked from commit b4a7eadb28a49ace84994dcff665b1cabae69652) diff --git a/configure b/configure index e6b9476..a0cff96 100755 --- a/configure +++ b/configure @@ -2275,7 +2275,7 @@ fi # detect build style if [ "$CFG_DEBUG" = "auto" ]; then - if [ "$PLATFORM_MAC" = "yes" ]; then + if [ "$PLATFORM_MAC" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then CFG_DEBUG_RELEASE=yes CFG_DEBUG=yes elif [ "$CFG_DEV" = "yes" ]; then @@ -6536,7 +6536,11 @@ if [ "$PLATFORM_QWS" = "yes" ]; then QT_CONFIG="$QT_CONFIG embedded" rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes fi -QMakeVar set PRECOMPILED_DIR ".pch/$QMAKE_OUTDIR" +if [ "$XPLATFORM_MINGW" != "yes" ]; then + # Do not set this here for Windows. Let qmake do it so + # debug and release precompiled headers are kept separate. + QMakeVar set PRECOMPILED_DIR ".pch/$QMAKE_OUTDIR" +fi QMakeVar set OBJECTS_DIR ".obj/$QMAKE_OUTDIR" QMakeVar set MOC_DIR ".moc/$QMAKE_OUTDIR" QMakeVar set RCC_DIR ".rcc/$QMAKE_OUTDIR" commit 6556a798f2803298a6884c53a9a15738015a00a4 Author: Mark Brand Date: Mon Aug 30 15:25:54 2010 +0200 Fix static build on Windows with MinGW. Q_DECL_IMPORT is still __declspec(dllimport), which is unsuitable for static code. Reviewed-by: Thiago Macieira (cherry picked from commit edbc656bfa5069dd40f64ae3123d6370c2d86538) diff --git a/src/svg/qsvghandler.cpp b/src/svg/qsvghandler.cpp index d545440..bf19a88 100644 --- a/src/svg/qsvghandler.cpp +++ b/src/svg/qsvghandler.cpp @@ -74,7 +74,7 @@ QT_BEGIN_NAMESPACE static const char *qt_inherit_text = "inherit"; #define QT_INHERIT QLatin1String(qt_inherit_text) -Q_DECL_IMPORT double qstrtod(const char *s00, char const **se, bool *ok); +Q_CORE_EXPORT double qstrtod(const char *s00, char const **se, bool *ok); // ======== duplicated from qcolor_p commit d8e44aea381dbdaa789f2dbb051cd8fc44ce0b31 Author: Mark Brand Date: Sat Jun 5 23:41:04 2010 +0200 added missing INSTALLS to JavaScriptCore.pro for static libjscore For static build of Qt on win32-g++*, applications using webkit link to libjscore.a. diff --git a/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro b/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro index 3f1ac86..602cb8d 100644 --- a/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro +++ b/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro @@ -14,6 +14,12 @@ QT -= gui CONFIG += depend_includepath +static:win32-g++* { + # applications must link to static libjscore + target.path = $$[QT_INSTALL_LIBS] + INSTALLS += target +} + contains(QT_CONFIG, embedded):CONFIG += embedded CONFIG(QTDIR_build) {