to generate makefile this function:make upload
upload:
scp filename orangepi@192.168.8.105:/home/orangepi/sgai
how should I code my cmakefile?
set(output “filename”)
set(destination orangepi@192.168.8.105:/home/orangepi/sgai)
add_custom_command(
DEPENDS “${target}”
OUTPUT “${output}”
COMMAND scp “$<TARGET_FILE:${target}>” “${destination}”
COMMAND “${CMAKE_COMMAND}” -E touch “${output}”)
add_custom_target(“upload” DEPENDS “${output}”)
please correct my code,thanks!