From 30eac4a4f9df0b7402fe70499be9385e7ee8737e Mon Sep 17 00:00:00 2001 From: Johannes Kauffmann Date: Tue, 18 Oct 2022 21:30:21 +0200 Subject: benchmarks: fix configuring with -no-feature-sql MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- tests/benchmarks/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests/benchmarks') 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() -- cgit v1.2.3