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