From 13253bd122dc77c40d76eccac8a6063cfbd3cd12 Mon Sep 17 00:00:00 2001 From: Alexey Edelev Date: Wed, 12 Apr 2023 15:04:14 +0200 Subject: Add the use of the qt_internal_project_setup function The function sets the required CMake variables and policies. Pick-to: 6.5 Task-number: QTBUG-112685 Change-Id: Ib2398f46802f34631c129aa2c5c66338f7f02291 Reviewed-by: Joerg Bornemann --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 20e6d3d..bfddcf2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,6 +16,8 @@ if (NOT WIN32) # special case begin set(QT_NO_INTERNAL_COMPATIBILITY_FUNCTIONS TRUE) find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS BuildInternals) + qt_internal_project_setup() + qt_build_repo_begin() add_subdirectory(src/activeqt/doc) qt_build_repo_end() @@ -27,6 +29,8 @@ find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS BuildInternals Co find_package(Qt6 ${PROJECT_VERSION} CONFIG OPTIONAL_COMPONENTS Qml Quick Gui Widgets PrintSupport OpenGL OpenGLWidgets ) +qt_internal_project_setup() + if(NOT TARGET Qt::Gui OR NOT TARGET Qt::Widgets OR NOT TARGET Qt::PrintSupport) message(NOTICE "Skipping the build as the condition \"TARGET Qt::Gui\", \"TARGET Qt::Widget\" " "or \"TARGET Qt::Printsupport\" is not met.") -- cgit v1.2.3