From 2c7ccfefedd582403902879857f34cc2dd373773 Mon Sep 17 00:00:00 2001 From: Leander Beernaert Date: Wed, 7 Aug 2019 10:23:28 +0200 Subject: [PATCH] Perform check for tool builds before src Perform the test whether tools should be built before entering the source directory of a project. In QtDeclarative this would result in a configuration error since the tools are used while building everything under src. Change-Id: I33ce2cb317ef221836d696654f3bb4e39db47e54 Reviewed-by: Alexandru Croitor --- cmake/QtBuildInternals/QtBuildInternalsConfig.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake b/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake index 590885c44d1..022c7994f11 100644 --- a/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake +++ b/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake @@ -76,13 +76,14 @@ macro(qt_build_repo) find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS Test) endif() + ## Decide whether tools will be built. + qt_check_if_tools_will_be_built() + if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/CMakeLists.txt") add_subdirectory(src) endif() if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/tools/CMakeLists.txt") - ## Decide whether tools will be built. - qt_check_if_tools_will_be_built() add_subdirectory(tools) endif()