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 <simon.hausmann@qt.io>
This commit is contained in:
Alexandru Croitor 2019-06-05 16:10:59 +02:00
parent 39f720e6dd
commit aa956e0822

View File

@ -70,6 +70,12 @@ macro(qt_build_repo)
add_subdirectory(src) add_subdirectory(src)
endif() 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") if (BUILD_TESTING AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/tests/CMakeLists.txt")
find_package(Qt5 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS Test Xml) find_package(Qt5 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS Test Xml)
add_subdirectory(tests) add_subdirectory(tests)