diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-06-26 15:06:00 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-06-26 22:14:29 +0200 |
commit | 2efd0fbc327b82bceada89753c07b7374ee0a05f (patch) | |
tree | 96630d397ea245e0908c8c7be0a84ecabf33b1f1 /cmake/QtBuild.cmake | |
parent | 3ef14c8943746673ffc6be62bca1f990b604a092 (diff) |
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>
Diffstat (limited to 'cmake/QtBuild.cmake')
-rw-r--r-- | cmake/QtBuild.cmake | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake index 0a4cfed66d..ced8d4a6f0 100644 --- a/cmake/QtBuild.cmake +++ b/cmake/QtBuild.cmake @@ -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) |