From 9d80deb92f066dba6c2bfce98f5cc83304026c2b Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Tue, 23 Feb 2021 16:44:13 +0100 Subject: cmake: disable snippets/graphicsview if "printdialog" is not available The graphicsview doc snippet has an explicit QT_REQUIRE_CONFIG(printdialog) check that will fail the build if Qt is not configured with "printdialog". This check should be mirrored in the cmake file, so that we skip building the snippet in the first place if the feature is not available. As it stood, we would build the snippet if "printsupport" was enabled. But this is too granular, as you can configure Qt to have general print support, but at the same time, skip the print dialog. This caused the build to fail on iOS. This patch will check the correct feature in the cmake file. Change-Id: I31acc1f7c257e08374ea7b84a7fc38c66f214271 Reviewed-by: Joerg Bornemann --- src/widgets/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/CMakeLists.txt b/src/widgets/CMakeLists.txt index 7cfe9d05f6..3c049c4061 100644 --- a/src/widgets/CMakeLists.txt +++ b/src/widgets/CMakeLists.txt @@ -829,7 +829,7 @@ if(QT_FEATURE_private_tests) add_subdirectory(doc/snippets/customviewstyle) add_subdirectory(doc/snippets/filedialogurls) add_subdirectory(doc/snippets/graphicssceneadditem) - if(QT_FEATURE_opengl AND QT_FEATURE_printsupport) + if(QT_FEATURE_opengl AND QT_FEATURE_printdialog) add_subdirectory(doc/snippets/graphicsview) endif() add_subdirectory(doc/snippets/mdiarea) -- cgit v1.2.3