CMake: Add meta-target host_tools to easily build just the tools
A developer could write 'ninja host_tools' to build the qtbase tools and their dependencies, and then configure another cross-compiling build dir pointing to the previous host build. This shortens the workflow for cross-building when working in qtbase. Change-Id: I69e70d23ce9df8669bcadf326d0586f097e5cb21 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
parent
3ef14c8943
commit
2efd0fbc32
@ -4587,6 +4587,13 @@ function(qt_add_tool target_name)
|
||||
)
|
||||
endif()
|
||||
|
||||
if(TARGET host_tools)
|
||||
add_dependencies(host_tools "${target_name}")
|
||||
if(bootstrap OR no_qt)
|
||||
add_dependencies(bootstrap_tools "${target_name}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# If building with a multi-config configuration, the main configuration tool will be placed in
|
||||
# ./bin, while the rest will be in <CONFIG> specific subdirectories.
|
||||
qt_get_tool_cmake_configuration(tool_cmake_configuration)
|
||||
|
@ -148,6 +148,13 @@ macro(qt_build_repo_begin)
|
||||
add_dependencies(install_html_docs_docs ${qt_docs_install_html_target_name})
|
||||
add_dependencies(install_qch_docs_docs ${qt_docs_install_qch_target_name})
|
||||
add_dependencies(install_docs_docs ${qt_docs_install_target_name})
|
||||
|
||||
# Add host_tools meta target, so that developrs can easily build only tools and their
|
||||
# dependencies when working in qtbase.
|
||||
if(NOT TARGET host_tools)
|
||||
add_custom_target(host_tools)
|
||||
add_custom_target(bootstrap_tools)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro(qt_build_repo_end)
|
||||
|
Loading…
Reference in New Issue
Block a user