From 7449d5fd4bd28a58d9aa552ed07935ccb5fe3d83 Mon Sep 17 00:00:00 2001 From: Rick Vogel Date: Sun, 30 Oct 2022 20:19:51 +0100 Subject: [PATCH] add check for optional components --- playground/CMakeLists.txt | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/playground/CMakeLists.txt b/playground/CMakeLists.txt index 75150bbb..2e518423 100644 --- a/playground/CMakeLists.txt +++ b/playground/CMakeLists.txt @@ -6,12 +6,18 @@ add_subdirectory(inputpanel) add_subdirectory(images) add_subdirectory(shadows) -# if(TARGET ${Qt}::WebEngine) # TODO check how to add optionally -if(TRUE) - add_subdirectory(webview) +if (Qt_VERSION_MAJOR VERSION_EQUAL "6") + if(TARGET ${Qt}::WebEngineCore) + if(TARGET ${Qt}::WebEngineQuick) + add_subdirectory(webview) + endif() + endif() +elseif(Qt_VERSION VERSION_EQUAL "5") + if(TARGET ${Qt}::WebEngine) + add_subdirectory(webview) + endif() endif() -# if(TARGET ${Qt}::QuickWidgets) # TODO check how to add optionally -if(TRUE) +if(TARGET ${Qt}::QuickWidgets) add_subdirectory(grids) endif()