summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorMark Brand <mabrand@mabrand.nl>2010-07-07 10:05:36 (GMT)
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2010-07-07 10:05:36 (GMT)
commitd7557de99b38031906c17c54496cb76a13dec5f7 (patch)
tree975c545f8c19edb5d7ccc84c7444db7d9b1da9ac /src/plugins
parent42fe2bfb65c85fc630efe32aa1d62d66f2caab2a (diff)
downloadQt-d7557de99b38031906c17c54496cb76a13dec5f7.zip
Qt-d7557de99b38031906c17c54496cb76a13dec5f7.tar.gz
Qt-d7557de99b38031906c17c54496cb76a13dec5f7.tar.bz2
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 <oswald.buddenhagen@nokia.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/sqldrivers/db2/db2.pro8
-rw-r--r--src/plugins/sqldrivers/ibase/ibase.pro12
-rw-r--r--src/plugins/sqldrivers/mysql/mysql.pro21
-rw-r--r--src/plugins/sqldrivers/oci/oci.pro11
-rw-r--r--src/plugins/sqldrivers/odbc/odbc.pro17
-rw-r--r--src/plugins/sqldrivers/psql/psql.pro16
-rw-r--r--src/plugins/sqldrivers/sqlite/sqlite.pro15
-rw-r--r--src/plugins/sqldrivers/sqlite2/sqlite2.pro7
-rw-r--r--src/plugins/sqldrivers/tds/tds.pro13
9 files changed, 18 insertions, 102 deletions
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)