summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2021-04-15 12:03:39 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2021-04-16 13:35:35 +0200
commitfbc98a84e737ad543d8aca0c89edca132b86aa42 (patch)
tree6f6c09f89b66515b98ae6e070553fec2458b7e40 /src
parent8aa4beaff186063b24a3760a1f36a3184f8bf2e7 (diff)
downloadqttools-fbc98a84e737ad543d8aca0c89edca132b86aa42.tar.gz
Fix inclusion of src/assistant in static per-repo builds
The inclusion of src/assistant was guarded by a FEATURE_sql_sqlite check, which is always false for per-repo builds. Instead, we now check whether the sqlite plugin is known to the Sql module. Pick-to: 6.1 Fixes: QTBUG-92033 Change-Id: I70936590c505d7edb01df51fd9020ef8a55520d6 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 1d777b457..657a7f306 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -14,6 +14,15 @@ qt_exclude_tool_directories_from_default_target(
${_qt_additional_tools_to_exclude} # special case
)
+# Check whether the sqlite plugin is available.
+set(sqlite_plugin_available FALSE)
+if(TARGET ${QT_CMAKE_EXPORT_NAMESPACE}::Sql)
+ get_target_property(sql_plugins ${QT_CMAKE_EXPORT_NAMESPACE}::Sql QT_PLUGINS)
+ if(QSQLiteDriverPlugin IN_LIST sql_plugins)
+ set(sqlite_plugin_available TRUE)
+ endif()
+endif()
+
# special case begin
# Evaluate features to decide what to build.
# The config files will be written in the src/global module.
@@ -27,7 +36,8 @@ if(QT_FEATURE_png AND QT_FEATURE_pushbutton AND QT_FEATURE_toolbutton AND TARGET
add_subdirectory(designer)
add_subdirectory(pixeltool)
endif()
-if(QT_FEATURE_png AND QT_FEATURE_pushbutton AND QT_FEATURE_toolbutton AND TARGET Qt::Widgets AND (FEATURE_sql_sqlite OR QT_BUILD_SHARED_LIBS)) # special case
+if(QT_FEATURE_png AND QT_FEATURE_pushbutton AND QT_FEATURE_toolbutton AND TARGET Qt::Widgets
+ AND (sqlite_plugin_available OR QT_BUILD_SHARED_LIBS))
add_subdirectory(assistant)
endif()
if(QT_FEATURE_png AND QT_FEATURE_thread AND QT_FEATURE_toolbutton AND TARGET Qt::Quick AND TARGET Qt::Widgets)