From ed07bdcb5f96d723f9c4c6b689ae95965c57c723 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 10 May 2017 18:55:06 +0200 Subject: make sql drivers independently configurable our binary packages come without many sql drivers, because they have proprietary dependencies we cannot ship. not every user wants to build all of qt from scratch, so it makes sense to make it possible to "enrich" the existing installation by compiling just the drivers. to enable this, the drivers' configuration must be independent. but note that it's still not possible to configure a single driver - the entire sqldrivers directory is configured at once. a side effect of this is that the availability of the sql plugins cannot be made known with publicFeatures any more, because there is no associated module pri file to put that information into. that should be made inconsequential by making qtHaveModule() work for plugins. Task-number: QTBUG-58372 Change-Id: Ibdebe3199688a57f93cea82dc15623081d1280f5 Reviewed-by: Joerg Bornemann --- src/plugins/sqldrivers/configure.json | 201 ++++++++++++++++++++++++++++++++++ 1 file changed, 201 insertions(+) create mode 100644 src/plugins/sqldrivers/configure.json (limited to 'src/plugins/sqldrivers/configure.json') diff --git a/src/plugins/sqldrivers/configure.json b/src/plugins/sqldrivers/configure.json new file mode 100644 index 0000000000..5603ceb37b --- /dev/null +++ b/src/plugins/sqldrivers/configure.json @@ -0,0 +1,201 @@ +{ + "module": "sqldrivers", + "depends": [ + "core" + ], + "testDir": "../../../config.tests", + + "commandline": { + "assignments": { + "MYSQL_PATH": "mysql.prefix", + "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": { + "label": "DB2 (IBM)", + "test": "unix/db2", + "sources": [ + { "libs": "-ldb2cli", "condition": "config.win32" }, + { "libs": "-ldb2", "condition": "!config.win32" } + ] + }, + "ibase": { + "label": "InterBase", + "test": "unix/ibase", + "sources": [ + { "libs": "-lgds32_ms", "condition": "config.win32" }, + { "libs": "-lgds", "condition": "!config.win32" } + ] + }, + "mysql": { + "label": "MySQL", + "test": "unix/mysql", + "sources": [ + { "type": "mysqlConfig", "query": "--libs_r", "cleanlibs": true }, + { "type": "mysqlConfig", "query": "--libs", "cleanlibs": true }, + { "type": "mysqlConfig", "query": "--libs_r", "cleanlibs": false }, + { "type": "mysqlConfig", "query": "--libs", "cleanlibs": false }, + { "libs": "-lmysqlclient_r", "condition": "!config.win32" }, + { "libs": "-llibmysql", "condition": "config.win32" }, + { "libs": "-lmysqlclient", "condition": "!config.win32" } + ] + }, + "psql": { + "label": "PostgreSQL", + "test": "unix/psql", + "sources": [ + { "type": "pkgConfig", "args": "libpq" }, + { "type": "psqlConfig" }, + { "type": "psqlEnv", "libs": "-llibpq -lws2_32 -ladvapi32", "condition": "config.win32" }, + { "type": "psqlEnv", "libs": "-lpq", "condition": "!config.win32" } + ] + }, + "tds": { + "label": "TDS (Sybase)", + "test": "unix/tds", + "sources": [ + { "type": "sybaseEnv", "libs": "-lNTWDBLIB", "condition": "config.win32" }, + { "type": "sybaseEnv", "libs": "-lsybdb", "condition": "!config.win32" } + ] + }, + "oci": { + "label": "OCI (Oracle)", + "test": "unix/oci", + "sources": [ + { "libs": "-loci", "condition": "config.win32" }, + { "libs": "-lclntsh", "condition": "!config.win32" } + ] + }, + "odbc": { + "label": "ODBC", + "test": "unix/odbc", + "sources": [ + { "libs": "-lodbc32", "condition": "config.win32" }, + { "libs": "-liodbc", "condition": "config.darwin" }, + { "libs": "-lodbc", "condition": "!config.win32 && !config.darwin" } + ] + }, + "sqlite2": { + "label": "SQLite (version 2)", + "test": "unix/sqlite2", + "sources": [ + "-lsqlite" + ] + }, + "sqlite3": { + "label": "SQLite (version 3)", + "export": "sqlite", + "test": "unix/sqlite", + "sources": [ + { "type": "pkgConfig", "args": "sqlite3" }, + "-lsqlite3" + ], + "use": [ + { "lib": "zlib", "condition": "!config.win32 && features.system-zlib" } + ] + } + }, + + "tests": { + }, + + "features": { + "sql-db2": { + "label": "DB2 (IBM)", + "condition": "libs.db2", + "output": [ "privateFeature" ] + }, + "sql-ibase": { + "label": "InterBase", + "condition": "libs.ibase", + "output": [ "privateFeature" ] + }, + "sql-mysql": { + "label": "MySql", + "condition": "libs.mysql", + "output": [ "privateFeature" ] + }, + "sql-oci": { + "label": "OCI (Oracle)", + "condition": "libs.oci", + "output": [ "privateFeature" ] + }, + "sql-odbc": { + "label": "ODBC", + "condition": "features.datestring && libs.odbc", + "output": [ "privateFeature" ] + }, + "sql-psql": { + "label": "PostgreSQL", + "condition": "libs.psql", + "output": [ "privateFeature" ] + }, + "sql-sqlite2": { + "label": "SQLite2", + "condition": "libs.sqlite2", + "output": [ "privateFeature" ] + }, + "sql-sqlite": { + "label": "SQLite", + "condition": "features.datestring", + "output": [ "privateFeature" ] + }, + "system-sqlite": { + "label": " Using system provided SQLite", + "autoDetect": false, + "condition": "features.sql-sqlite && libs.sqlite3", + "output": [ "privateFeature" ] + }, + "sql-tds": { + "label": "TDS (Sybase)", + "condition": "features.datestring && libs.tds", + "output": [ "privateFeature" ] + } + }, + + "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" + ] + } + ] +} -- cgit v1.2.3