mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-12 19:10:27 +03:00
16 lines
655 B
CMake
16 lines
655 B
CMake
function(setup_svd target_exe target_name)
|
|
get_property(svd_name TARGET ${target_exe} PROPERTY SVD)
|
|
set(svd_target_name "svd_${target_name}")
|
|
if (svd_name AND NOT svd_name STREQUAL "")
|
|
add_custom_target(${svd_target_name}
|
|
COMMAND ${CMAKE_COMMAND} -E copy
|
|
${SVD_DIR}/${svd_name}.svd
|
|
${CMAKE_BINARY_DIR}/svd/${target_name}.svd
|
|
)
|
|
else()
|
|
add_custom_target(${svd_target_name}
|
|
${CMAKE_COMMAND} -E echo "target ${target_name} does not declare an SVD filename"
|
|
COMMAND ${CMAKE_COMMAND} -E false)
|
|
endif()
|
|
exclude_from_all(${svd_target_name})
|
|
endfunction()
|