summaryrefslogtreecommitdiffstats
path: root/src/plugins/sqldrivers/qt_cmdline.cmake
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2024-03-14 15:59:31 +0100
committerJoerg Bornemann <joerg.bornemann@qt.io>2024-03-27 06:56:09 +0100
commit6e12a298f459eb66bf2fc28f5ff36202436c2e0b (patch)
tree1c44ce5a02c0eb7fb7c6a6943f53152d9f0a21cc /src/plugins/sqldrivers/qt_cmdline.cmake
parent52c7357fced9f10fafba68344781ceab48fc1b16 (diff)
configure: Fix -system-zlib and -system-sqlite options
These options are declared with TYPE enum and a MAPPING that's supposed to control the feature 'system-zlib' or 'system-sqlite'. Since only inputs of type boolean control features now, we need to somehow declare that this non-boolean input controls a feature. We do this by adding the keyword CONTROLS_FEATURE to qt_commandline_option. For example, qt_commandline_option(zlib CONTROLS_FEATURE TYPE enum NAME system-zlib MAPPING system yes qt no ) declares - commandline option "zlib" sets the input "system-zlib", because of the "NAME system-zlib" argument - accepted input values are "system" and "qt", because we have "TYPE enum" and the odd values of MAPPING - those values are translated to yes/no, because of the even values of MAPPING - CONTROLS_FEATURE forces the translated input's type to boolean, and with that it will set the corresponding feature 'system-zlib' Luckily, only qtbase has command line options with MAPPING declared. Change-Id: I82d06cec43ece3b002c8f5dd414c68dc730909af Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'src/plugins/sqldrivers/qt_cmdline.cmake')
-rw-r--r--src/plugins/sqldrivers/qt_cmdline.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/sqldrivers/qt_cmdline.cmake b/src/plugins/sqldrivers/qt_cmdline.cmake
index 945de0e63b..2bb1fc64eb 100644
--- a/src/plugins/sqldrivers/qt_cmdline.cmake
+++ b/src/plugins/sqldrivers/qt_cmdline.cmake
@@ -3,7 +3,7 @@
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(sqlite CONTROLS_FEATURE 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)