diff options
author | Johannes Kauffmann <johanneskauffmann@hotmail.com> | 2022-10-18 21:30:21 +0200 |
---|---|---|
committer | Johannes Kauffmann <johanneskauffmann@hotmail.com> | 2022-10-25 16:39:25 +0200 |
commit | 30eac4a4f9df0b7402fe70499be9385e7ee8737e (patch) | |
tree | b5397763b37fd51e430b3f77ad72f7a869f1fd70 /tests/benchmarks | |
parent | 60de00cb2fccbb407933b04b5236b2dc22b47dfd (diff) |
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
Pick-to: 6.2 6.3 6.4
Change-Id: I411631acfd336ea699833954f86711067d160c04
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
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 2e490904b9..dca1507405 100644 --- a/tests/benchmarks/CMakeLists.txt +++ b/tests/benchmarks/CMakeLists.txt @@ -4,7 +4,6 @@ # Generated from benchmarks.pro. add_subdirectory(corelib) -add_subdirectory(sql) if(TARGET Qt::DBus) add_subdirectory(dbus) endif() @@ -14,6 +13,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() |