Set QT_SUPERBUILD early

That will allow qtbase's .cmake.conf to check whether it is meant to be
used in a superbuild or only for qtbase.

Task-number: QTBUG-101640
Change-Id: I035c86f32497004cc1b8441456604106bacadad4
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 14e486a8c4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Fabian Kosmale
2022-03-18 12:02:17 +01:00
committed by Qt Cherry-pick Bot
parent 9362c7ec43
commit 0420b8e8d2

View File

@@ -2,6 +2,10 @@
# 3.16 is the absolute minimum though.
cmake_minimum_required(VERSION 3.16...3.20)
# set QT_SUPERBUILD early, so that qtbase/.cmake.conf can check it
set(QT_SUPERBUILD TRUE)
# Include qtbase's .cmake.conf for access to QT_REPO_MODULE_VERSION
set(__qt6_qtbase_src_path "${CMAKE_CURRENT_SOURCE_DIR}/qtbase")
include("${__qt6_qtbase_src_path}/.cmake.conf")
@@ -37,7 +41,6 @@ include(ECMOptionalAddSubdirectory)
if (NOT QT_BUILD_STANDALONE_TESTS)
set(QT_NO_CREATE_TARGETS TRUE)
endif()
set(QT_SUPERBUILD TRUE)
# Get submodule list if not already defined
if(NOT QT_BUILD_SUBMODULES)