diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2023-11-17 16:46:45 +0100 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2023-11-27 19:53:42 +0100 |
commit | 2b1f2338631ae24614637b90c45f2778c3c77e37 (patch) | |
tree | 3f77453c1458d21e03cb57a35877bb6e4fa56ba3 /cmake/QtBuildInternals/QtBuildInternalsConfig.cmake | |
parent | 381d2fb014c93489d39a41436183bdbe14270621 (diff) |
CMake: Mostly unify includes into a single location
Make the QtBuildRepoHelpers and QtBuildRepoExamplesHelpers files
that were previously loaded as part of BuildInternals package instead
be loaded when qt_internal_include_all_helpers is called.
Load all the helpers as soon as find_package(QtBuildInternals) is
called rather than when qt_build_repo() is called.
This is a behavior change, but because including the Qt's Helpers
should have no side-effects aside from defining functions,
it should be fine.
This lets us have a unified location where to include Helpers files,
instead of thinking whether it needs to be done in QtBuildInternals or
in QtBuildHelpers or some other place.
Move also some additional inclusions into the same function.
Note that including some upstream CMake files like CMakeFindBinUtils
does have side-effects, but we've been doing it already anyway,
so moving it to the top should not make a difference because any
modifications we would do to the globally assigned variables would
have come later when we actually called our own functions.
Task-number: QTBUG-86035
Change-Id: I33f36f7e8db69d504c34a4d4a094b98f6fa50ee4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Diffstat (limited to 'cmake/QtBuildInternals/QtBuildInternalsConfig.cmake')
-rw-r--r-- | cmake/QtBuildInternals/QtBuildInternalsConfig.cmake | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake b/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake index d1857521b2..129f1ebb77 100644 --- a/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake +++ b/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake @@ -62,7 +62,7 @@ if(NOT QT_BUILD_INTERNALS_SKIP_CMAKE_MODULE_PATH_ADDITION) qt_set_up_build_internals_paths() endif() -include(QtBuildRepoExamplesHelpers) -include(QtBuildRepoHelpers) +include(QtBuildHelpers) +qt_internal_include_all_helpers() qt_internal_setup_build_internals() |