From aa956e08229ee4884d88cc63b640b2cf19ef45d3 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Wed, 5 Jun 2019 16:10:59 +0200 Subject: [PATCH] Change qt_build_repo to build tools if present and needed This is needed for qtdeclarative, to automatically start building the tools if needed. Change-Id: I3cbe129e8bb6fa8572a8e34fd3653b51727cb244 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann --- cmake/QtBuildInternals/QtBuildInternalsConfig.cmake | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake b/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake index 6a1202ac2eb..e4468aa3555 100644 --- a/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake +++ b/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake @@ -70,6 +70,12 @@ macro(qt_build_repo) 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() + if (BUILD_TESTING AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/tests/CMakeLists.txt") find_package(Qt5 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS Test Xml) add_subdirectory(tests)