author | Eckhart Koeppen <eckhart.koppen@nokia.com> |
Thu, 08 Apr 2010 14:19:33 +0300 | |
branch | RCL_3 |
changeset 7 | 3f74d0d4af4c |
parent 0 | 1918ee327afb |
permissions | -rw-r--r-- |
0 | 1 |
contains(sql-drivers, all ) { |
2 |
sql-driver += psql mysql odbc oci tds db2 sqlite ibase |
|
3 |
} |
|
4 |
||
5 |
contains(sql-drivers, psql) { |
|
6 |
HEADERS += drivers/psql/qsql_psql.h |
|
7 |
SOURCES += drivers/psql/qsql_psql.cpp |
|
8 |
||
9 |
unix { |
|
10 |
!isEmpty(QT_LFLAGS_PSQL) { |
|
11 |
LIBS *= $$QT_LFLAGS_PSQL |
|
12 |
QMAKE_CXXFLAGS *= $$QT_CFLAGS_PSQL |
|
13 |
} |
|
14 |
!contains(LIBS, .*pq.*):LIBS *= -lpq |
|
15 |
} |
|
16 |
||
17 |
win32 { |
|
18 |
!win32-g++:!contains( LIBS, .*pq.* ):LIBS *= -llibpq |
|
19 |
win32-g++:!contains( LIBS, .*pq.* ):LIBS *= -lpq |
|
20 |
LIBS *= -lws2_32 -ladvapi32 |
|
21 |
} |
|
22 |
} |
|
23 |
||
24 |
contains(sql-drivers, mysql) { |
|
25 |
HEADERS += drivers/mysql/qsql_mysql.h |
|
26 |
SOURCES += drivers/mysql/qsql_mysql.cpp |
|
27 |
||
28 |
unix { |
|
29 |
isEmpty(QT_LFLAGS_MYSQL) { |
|
30 |
!contains(LIBS, .*mysqlclient.*):!contains(LIBS, .*mysqld.*) { |
|
31 |
use_libmysqlclient_r:LIBS *= -lmysqlclient_r |
|
32 |
else:LIBS *= -lmysqlclient |
|
33 |
} |
|
34 |
} else { |
|
35 |
LIBS *= $$QT_LFLAGS_MYSQL |
|
36 |
QMAKE_CXXFLAGS *= $$QT_CFLAGS_MYSQL |
|
37 |
} |
|
38 |
} |
|
39 |
||
40 |
win32:!contains(LIBS, .*mysql.*):!contains(LIBS, .*mysqld.*) { |
|
41 |
!win32-g++:LIBS *= -llibmysql |
|
42 |
win32-g++:LIBS *= -lmysql |
|
43 |
} |
|
44 |
} |
|
45 |
||
46 |
contains(sql-drivers, odbc) { |
|
47 |
HEADERS += drivers/odbc/qsql_odbc.h |
|
48 |
SOURCES += drivers/odbc/qsql_odbc.cpp |
|
49 |
||
50 |
mac:!contains( LIBS, .*odbc.* ):LIBS *= -liodbc |
|
51 |
unix:!contains( LIBS, .*odbc.* ):LIBS *= -lodbc |
|
7
3f74d0d4af4c
qt:70947f0f93d948bc89b3b43d00da758a51f1ef84
Eckhart Koeppen <eckhart.koppen@nokia.com>
parents:
0
diff
changeset
|
52 |
unix:DEFINES += UNICODE |
0 | 53 |
|
54 |
win32 { |
|
55 |
!win32-borland:LIBS *= -lodbc32 |
|
56 |
win32-borland:LIBS *= $(BCB)/lib/PSDK/odbc32.lib |
|
57 |
} |
|
58 |
} |
|
59 |
||
60 |
contains(sql-drivers, oci) { |
|
61 |
HEADERS += drivers/oci/qsql_oci.h |
|
62 |
SOURCES += drivers/oci/qsql_oci.cpp |
|
63 |
||
64 |
unix:!contains( LIBS, .*clnts.* ):LIBS += -lclntsh |
|
65 |
||
66 |
win32:LIBS += -loci |
|
67 |
} |
|
68 |
||
69 |
contains(sql-drivers, tds) { |
|
70 |
HEADERS += drivers/tds/qsql_tds.h |
|
71 |
SOURCES += drivers/tds/qsql_tds.cpp |
|
72 |
||
73 |
unix:LIBS += -L$SYBASE/lib -lsybdb |
|
74 |
||
75 |
win32 { |
|
76 |
!win32-borland:LIBS += -lNTWDBLIB |
|
77 |
win32-borland:LIBS += $(BCB)/lib/PSDK/NTWDBLIB.LIB |
|
78 |
} |
|
79 |
} |
|
80 |
||
81 |
contains(sql-drivers, db2) { |
|
82 |
HEADERS += drivers/db2/qsql_db2.h |
|
83 |
SOURCES += drivers/db2/qsql_db2.cpp |
|
84 |
||
85 |
unix:LIBS += -ldb2 |
|
86 |
||
87 |
win32 { |
|
88 |
!win32-borland:LIBS += -ldb2cli |
|
89 |
# win32-borland:LIBS += $(BCB)/lib/PSDK/db2cli.lib |
|
90 |
} |
|
91 |
} |
|
92 |
||
93 |
contains(sql-drivers, ibase) { |
|
94 |
HEADERS += drivers/ibase/qsql_ibase.h |
|
95 |
SOURCES += drivers/ibase/qsql_ibase.cpp |
|
96 |
||
97 |
unix:LIBS *= -lgds |
|
98 |
||
99 |
win32 { |
|
100 |
!win32-borland:LIBS *= -lgds32_ms |
|
101 |
win32-borland:LIBS += gds32.lib |
|
102 |
} |
|
103 |
} |
|
104 |
||
105 |
contains(sql-drivers, sqlite2) { |
|
106 |
HEADERS += drivers/sqlite2/qsql_sqlite2.h |
|
107 |
SOURCES += drivers/sqlite2/qsql_sqlite2.cpp |
|
108 |
!contains(LIBS, .*sqlite.*):LIBS *= -lsqlite |
|
109 |
} |
|
110 |
||
111 |
contains(sql-drivers, sqlite) { |
|
112 |
!system-sqlite:!contains( LIBS, .*sqlite3.* ) { |
|
113 |
CONFIG(release, debug|release):DEFINES *= NDEBUG |
|
114 |
DEFINES += SQLITE_OMIT_LOAD_EXTENSION SQLITE_OMIT_COMPLETE |
|
115 |
INCLUDEPATH += ../3rdparty/sqlite |
|
116 |
SOURCES += ../3rdparty/sqlite/sqlite3.c |
|
117 |
} else { |
|
118 |
LIBS *= $$QT_LFLAGS_SQLITE |
|
119 |
QMAKE_CXXFLAGS *= $$QT_CFLAGS_SQLITE |
|
120 |
} |
|
121 |
||
122 |
HEADERS += drivers/sqlite/qsql_sqlite.h |
|
123 |
SOURCES += drivers/sqlite/qsql_sqlite.cpp |
|
124 |
} |