path: root/src/plugins/sqldrivers
diff options
authorJoerg Bornemann <>2020-07-08 11:35:43 +0200
committerJoerg Bornemann <>2020-08-17 08:08:20 +0200
commit584d4be174c6ac8cd0f3395c3852bfe1516f09a5 (patch)
tree9e8aafe467de28bf80c6bb861f6abec139454d29 /src/plugins/sqldrivers
parent2f9a294252ae44defd4d8ae1b3c09d8e36ee0612 (diff)
CMake: Re-implement configure/qmake's command line handling in CMake
We extend configurejson2cmake to read the "commandline" information from configure.json. This data is then translated to CMake function calls and written it into commandline.cmake files. We extend QtProcessConfigureArgs.cmake to pick up those commandline.cmake files to feed our command line handling code, which is a re-implementation of the command line handling in qt_configure.prf. The command line handler sets INPUT_xxx variables, similar to configure/qmake's variables. The INPUT_xxx values are translated - to -DFEATURE_xxx=ON/OFF arguments if the input represents a feature, - to corresponding CMake variables if such a variable is known, - or to -DINPUT_xxx=yyy CMake arguments. Configure arguments that have an entry in cmake/ are actually implemented. Other arguments are likely to need more work. Task-number: QTBUG-85373 Change-Id: Ia96baa673fc1fb88e73ba05a1afb473aa074b37d Reviewed-by: Alexandru Croitor <>
Diffstat (limited to 'src/plugins/sqldrivers')
1 files changed, 18 insertions, 0 deletions
diff --git a/src/plugins/sqldrivers/qt_cmdline.cmake b/src/plugins/sqldrivers/qt_cmdline.cmake
new file mode 100644
index 0000000000..91b6f9f767
--- /dev/null
+++ b/src/plugins/sqldrivers/qt_cmdline.cmake
@@ -0,0 +1,18 @@
+qt_commandline_option(mysql_config TYPE string)
+qt_commandline_option(psql_config TYPE string)
+qt_commandline_option(sqlite TYPE enum NAME system-sqlite MAPPING qt no system yes)
+qt_commandline_option(sql-db2 TYPE boolean)
+qt_commandline_option(sql-ibase TYPE boolean)
+qt_commandline_option(sql-mysql TYPE boolean)
+qt_commandline_option(sql-oci TYPE boolean)
+qt_commandline_option(sql-odbc TYPE boolean)
+qt_commandline_option(sql-psql TYPE boolean)
+qt_commandline_option(sql-sqlite TYPE boolean)
+qt_commandline_option(plugin-sql-db2 TYPE void NAME sql-db2)
+qt_commandline_option(plugin-sql-ibase TYPE void NAME sql-ibase)
+qt_commandline_option(plugin-sql-mysql TYPE void NAME sql-mysql)
+qt_commandline_option(plugin-sql-oci TYPE void NAME sql-oci)
+qt_commandline_option(plugin-sql-odbc TYPE void NAME sql-odbc)
+qt_commandline_option(plugin-sql-psql TYPE void NAME sql-psql)
+qt_commandline_option(plugin-sql-sqlite TYPE void NAME sql-sqlite)
+qt_commandline_assignment(MYSQL_PATH mysql.prefix)