summaryrefslogtreecommitdiffstats
path: root/src/sql/configure.json
blob: 2277fcb54604616532d33ccf7764332183828c7e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
{
    "module": "sql",
    "depends": [
        "core"
    ],
    "testDir": "../../config.tests",

    "commandline": {
        "assignments": {
            "MYSQL_PATH": "mysql.prefix",
            "PSQL_LIBS": "psql.libs",
            "SYBASE": "tds.prefix",
            "SYBASE_LIBS": "tds.libs"
        },
        "options": {
            "mysql_config": "string",
            "psql_config": "string",
            "sqlite": { "type": "enum", "name": "system-sqlite", "values": { "qt": "no", "system": "yes" } },
            "sql-db2": "boolean",
            "sql-ibase": "boolean",
            "sql-mysql": "boolean",
            "sql-oci": "boolean",
            "sql-odbc": "boolean",
            "sql-psql": "boolean",
            "sql-sqlite": "boolean",
            "sql-sqlite2": "boolean",
            "sql-tds": "boolean",
            "plugin-sql-db2": { "type": "void", "name": "sql-db2" },
            "plugin-sql-ibase": { "type": "void", "name": "sql-ibase" },
            "plugin-sql-mysql": { "type": "void", "name": "sql-mysql" },
            "plugin-sql-oci": { "type": "void", "name": "sql-oci" },
            "plugin-sql-odbc": { "type": "void", "name": "sql-odbc" },
            "plugin-sql-psql": { "type": "void", "name": "sql-psql" },
            "plugin-sql-sqlite": { "type": "void", "name": "sql-sqlite" },
            "plugin-sql-sqlite2": { "type": "void", "name": "sql-sqlite2" },
            "plugin-sql-tds": { "type": "void", "name": "sql-tds" }
        }
    },

    "libraries": {
        "db2": {
            "description": "DB2 (IBM)",
            "test": "unix/db2",
            "sources": [
                { "libs": "-ldb2cli", "condition": "config.win32" },
                { "libs": "-ldb2", "condition": "!config.win32" }
            ]
        },
        "ibase": {
            "description": "InterBase",
            "test": "unix/ibase",
            "sources": [
                { "libs": "-lgds32_ms", "condition": "config.win32" },
                { "libs": "-lgds", "condition": "!config.win32" }
            ]
        },
        "mysql": {
            "description": "MySQL",
            "test": "unix/mysql",
            "sources": [
                { "type": "mysqlConfig", "query": "--libs_r" },
                { "type": "mysqlConfig", "query": "--libs" },
                { "libs": "-lmysqlclient_r", "condition": "!config.win32" },
                { "libs": "-llibmysql", "condition": "config.win32" },
                { "libs": "-lmysqlclient", "condition": "!config.win32" }
            ]
        },
        "psql": {
            "description": "PostgreSQL",
            "test": "unix/psql",
            "sources": [
                { "type": "psqlConfig" },
                { "type": "psqlEnv", "libs": "-llibpq -lws2_32 -ladvapi32", "condition": "config.win32" },
                { "type": "psqlEnv", "libs": "-lpq", "condition": "!config.win32" }
            ]
        },
        "tds": {
            "description": "TDS (Sybase)",
            "test": "unix/tds",
            "sources": [
                { "type": "sybaseEnv", "libs": "-lNTWDBLIB", "condition": "config.win32" },
                { "type": "sybaseEnv", "libs": "-lsybdb", "condition": "!config.win32" }
            ]
        },
        "oci": {
            "description": "OCI (Oracle)",
            "test": "unix/oci",
            "sources": [
                { "libs": "-loci", "condition": "config.win32" },
                { "libs": "-lclntsh", "condition": "!config.win32" }
            ]
        },
        "odbc": {
            "description": "ODBC",
            "test": "unix/odbc",
            "sources": [
                { "libs": "-lodbc32", "condition": "config.win32" },
                { "libs": "-liodbc", "condition": "config.darwin" },
                { "libs": "-lodbc", "condition": "!config.win32 && !config.darwin" }
            ]
        },
        "sqlite2": {
            "description": "SQLite (version 2)",
            "test": "unix/sqlite2",
            "sources": [
                "-lsqlite"
            ]
        },
        "sqlite3": {
            "description": "SQLite (version 3)",
            "export": "sqlite",
            "test": "unix/sqlite",
            "sources": [
                { "type": "pkgConfig", "args": "sqlite3" },
                { "libs": "-lsqlite3", "condition": "config.win32" },
                { "libs": "-lsqlite3 -lz", "condition": "!config.win32" }
            ]
        }
    },

    "tests": {
    },

    "features": {
        "sql-db2": {
            "description": "DB2 (IBM)",
            "condition": "libs.db2",
            "output": [ "publicFeature" ]
        },
        "sql-ibase": {
            "description": "InterBase",
            "condition": "libs.ibase",
            "output": [ "publicFeature" ]
        },
        "sql-mysql": {
            "description": "MySql",
            "condition": "libs.mysql",
            "output": [ "publicFeature" ]
        },
        "use_libmysqlclient_r": {
            "description": "MySql (threadsafe)",
            "condition": "features.sql-mysql && (libs.mysql.source == 0 || libs.mysql.source == 2)",
            "output": [ "privateConfig" ]
        },
        "sql-oci": {
            "description": "OCI (Oracle)",
            "condition": "libs.oci",
            "output": [ "publicFeature" ]
        },
        "sql-odbc": {
            "description": "ODBC",
            "condition": "libs.odbc",
            "output": [ "publicFeature" ]
        },
        "sql-psql": {
            "description": "PostgreSQL",
            "condition": "libs.psql",
            "output": [ "publicFeature" ]
        },
        "sql-sqlite2": {
            "description": "SQLite2",
            "condition": "libs.sqlite2",
            "output": [ "publicFeature" ]
        },
        "sql-sqlite": {
            "description": "SQLite",
            "output": [ "publicFeature" ]
        },
        "system-sqlite": {
            "description": "  Using system provided SQLite",
            "autoDetect": false,
            "condition": "features.sql-sqlite && libs.sqlite3",
            "output": [ "publicQtConfig" ]
        },
        "sql-tds": {
            "description": "TDS (Sybase)",
            "condition": "libs.tds",
            "output": [ "publicFeature" ]
        }
    },

    "report": [
        {
            "type": "warning",
            "condition": "config.win32 && !config.msvc && features.sql-oci",
            "message": "Qt does not support compiling the Oracle database driver with
MinGW, due to lack of such support from Oracle. Consider disabling the
Oracle driver, as the current build will most likely fail."
        }
    ],

    "summary": [
        {
            "section": "Qt Sql",
            "entries": [
                "sql-db2", "sql-ibase", "sql-mysql", "sql-oci", "sql-odbc", "sql-psql",
                "sql-sqlite2", "sql-sqlite", "system-sqlite", "sql-tds"
            ]
        }
    ]
}