mirror of
https://github.com/reactos/reactos.git
synced 2024-12-29 02:25:17 +00:00
[CMAKE] Mark host tools as byproducts. CORE-17109
This commit is contained in:
parent
b783349e4e
commit
dadc59f135
1 changed files with 10 additions and 4 deletions
|
@ -27,17 +27,23 @@ function(configure_host_tools HOST_TOOLS_DIR)
|
|||
|
||||
set_property(SOURCE host_tools PROPERTY SYMBOLIC 1)
|
||||
|
||||
include(${HOST_TOOLS_DIR}/ImportExecutables.cmake)
|
||||
include(${HOST_TOOLS_DIR}/TargetList.cmake)
|
||||
|
||||
foreach(_target ${NATIVE_TARGETS})
|
||||
get_target_property(_target_location native-${_target} LOCATION)
|
||||
list(APPEND _target_locations ${_target_location})
|
||||
endforeach()
|
||||
|
||||
# Make a host-tools target so it'll be built when needed
|
||||
# custom target + symbolic output prevents cmake from running
|
||||
# the command multiple times per build
|
||||
add_custom_command(
|
||||
COMMAND ${CMAKE_COMMAND} --build ${HOST_TOOLS_DIR}
|
||||
OUTPUT host_tools)
|
||||
OUTPUT host_tools
|
||||
BYPRODUCTS ${_target_locations})
|
||||
add_custom_target(build-host-tools ALL DEPENDS host_tools)
|
||||
|
||||
include(${HOST_TOOLS_DIR}/ImportExecutables.cmake)
|
||||
include(${HOST_TOOLS_DIR}/TargetList.cmake)
|
||||
|
||||
foreach(_target ${NATIVE_TARGETS})
|
||||
add_dependencies(native-${_target} build-host-tools)
|
||||
endforeach()
|
||||
|
|
Loading…
Reference in a new issue