diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-09-26 17:58:53 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-09-27 08:42:18 +0000 |
commit | 981cfe7d79b906090fb20558a6f11bc2224640ed (patch) | |
tree | 58eea4cd3ab35e77468003262a74c250367622e5 /cmake/QtBuildInternals | |
parent | 992fe06b30337442b96e5f8b6553e518fedcd372 (diff) |
Include QtPlatformSupport as part of find_package(Qt6BuildInternals)
This is needed because the ported over requires() clauses from qmake
to CMake are executed before qt_repo_build(), which means that all the
custom platform variables that we set (like LINUX, APPLE_OSX) need
to be available immediately after finding BuildInternals.
Change-Id: I7345b69edf72c266508846766e64f42c99862d1d
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'cmake/QtBuildInternals')
-rw-r--r-- | cmake/QtBuildInternals/QtBuildInternalsConfig.cmake | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake b/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake index 6fffcaba9d..4bf09e5b15 100644 --- a/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake +++ b/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake @@ -13,7 +13,7 @@ if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/QtBuildInternalsExtra.cmake") endif() macro(qt_set_up_build_internals_paths) - # Set up the paths for the cmake modules located in the build dir. Prepend, so the paths are + # Set up the paths for the cmake modules located in the prefix dir. Prepend, so the paths are # least important compared to the source dir ones, but more important than command line # provided ones. set(QT_CMAKE_MODULE_PATH "${QT_BUILD_INTERNALS_PATH}/../${QT_CMAKE_EXPORT_NAMESPACE}") @@ -39,13 +39,17 @@ macro(qt_set_up_build_internals_paths) endif() endmacro() -macro(qt_build_repo_begin) - if(${ARGC} EQUAL 1 AND "${ARGV0}" STREQUAL "SKIP_CMAKE_MODULE_PATH_ADDITION") - # No-op. - else() - qt_set_up_build_internals_paths() - endif() +# Set up the build internal paths unless explicitly requested not to. +if(NOT QT_BUILD_INTERNALS_SKIP_CMAKE_MODULE_PATH_ADDITION) + qt_set_up_build_internals_paths() +endif() + +# Define some constants to check for certain platforms, etc. +# Needs to be loaded before qt_repo_build() to handle require() clauses before even starting a repo +# build. +include(QtPlatformSupport) +macro(qt_build_repo_begin) # Qt specific setup common for all modules: include(QtSetup) include(FeatureSummary) |