diff options
author | Fabian Kosmale <fabian.kosmale@qt.io> | 2022-03-18 12:16:30 +0100 |
---|---|---|
committer | Fabian Kosmale <fabian.kosmale@qt.io> | 2022-03-18 12:33:10 +0100 |
commit | fa13e35ce47bc0d47f0fbf9888dc653f350ec7ad (patch) | |
tree | 009f16583200cdb43aae55af859e855741445be8 | |
parent | fb7e9bef8db619c98ff0becca4a4f15663173b97 (diff) | |
download | qtbase-fa13e35ce47bc0d47f0fbf9888dc653f350ec7ad.tar.gz |
cmake: only use qtbase configuration in qtbase
In a toplevel build, we include qtbase's .cmake.conf twice: Once for
qtbase itself, but already earlier to provide some necessary information
for the toplevel build. We now detect the latter, and skip setting
QT_EXTRA_INTERNAL_TARGET_DEFINES in that case, to ensure that it is only
applied to the qtbase itself
Task-number: QTBUG-101640
Pick-to: 6.2 6.3
Change-Id: I14dbf6110c79331fac38cceb76f669ca329ad33a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
-rw-r--r-- | .cmake.conf | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/.cmake.conf b/.cmake.conf index ee63c78947..9d09fbd7c8 100644 --- a/.cmake.conf +++ b/.cmake.conf @@ -1,3 +1,12 @@ +# set (git) module specific defines, but only if we are actually qtbase +# do _not_ set them as the global toplevel configuration +# we check for QT_REPO_MODULE_VERSION before defining it below; that will +# ensure that when this file is included the second time in a toplevel buld +# (directly by qtbase) we actually add the extra definitions +if (NOT DEFINED QT_SUPERBUILD OR DEFINED QT_REPO_MODULE_VERSION) + set(QT_EXTRA_INTERNAL_TARGET_DEFINES "QT_LEAN_HEADERS=1") +endif() + set(QT_REPO_MODULE_VERSION "6.4.0") set(QT_REPO_MODULE_PRERELEASE_VERSION_SEGMENT "alpha1") @@ -22,6 +31,3 @@ set(QT_SUPPORTED_MIN_CMAKE_VERSION_FOR_USING_QT_STATIC "3.21") # in sync. set(QT_MIN_NEW_POLICY_CMAKE_VERSION "3.16") set(QT_MAX_NEW_POLICY_CMAKE_VERSION "3.21") - -# set (git) module specific defines -set(QT_EXTRA_INTERNAL_TARGET_DEFINES "QT_LEAN_HEADERS=1") |