diff options
author | Johannes Kauffmann <johanneskauffmann@hotmail.com> | 2022-10-18 21:30:21 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-10-25 14:57:19 +0000 |
commit | 564471f9d221cb9ef94441c9c6b8a0e452bf5a64 (patch) | |
tree | 207552bf476e7a4697eb6a962b1ec1f266272705 /tests/benchmarks | |
parent | 3fc5c9b6b6ce08298e98bde84e75661a155398c9 (diff) | |
download | qtbase-564471f9d221cb9ef94441c9c6b8a0e452bf5a64.tar.gz |
benchmarks: fix configuring with -no-feature-sql
With -no-feature-sql, CMake would error out because the target Qt6::Sql
didn't exist. Fix this by checking if the target exists.
Task-number: QTBUG-102480
Change-Id: I411631acfd336ea699833954f86711067d160c04
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 30eac4a4f9df0b7402fe70499be9385e7ee8737e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'tests/benchmarks')
-rw-r--r-- | tests/benchmarks/CMakeLists.txt | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/benchmarks/CMakeLists.txt b/tests/benchmarks/CMakeLists.txt index a59ba35e50..b6f45aab4f 100644 --- a/tests/benchmarks/CMakeLists.txt +++ b/tests/benchmarks/CMakeLists.txt @@ -1,7 +1,6 @@ # Generated from benchmarks.pro. add_subdirectory(corelib) -add_subdirectory(sql) if(TARGET Qt::DBus) add_subdirectory(dbus) endif() @@ -11,6 +10,9 @@ endif() if(TARGET Qt::Network) add_subdirectory(network) endif() +if(TARGET Qt::Sql) + add_subdirectory(sql) +endif() if(TARGET Qt::Test) add_subdirectory(testlib) endif() |