Fork from inav at github. Modified for some special functions needs.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

16 lines
655 B

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()