Add the use of the qt_internal_project_setup function

The function sets the required CMake variables and policies.

Task-number: QTBUG-112685
Change-Id: Ib2398f46802f34631c129aa2c5c66338f7f02291
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 13253bd122)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Alexey Edelev 2023-04-12 15:04:14 +02:00 committed by Qt Cherry-pick Bot
parent 03c0a6ff33
commit e3521792e4
1 changed files with 4 additions and 0 deletions

View File

@ -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.")