From a6d913623dc47bc95f2c358e76803bdf8905ab71 Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Sun, 15 Jan 2017 01:46:27 -0500 Subject: [PATCH] cmake nuttx rsync copy only use relative paths - this is to work around confusion between cygwin and windows native paths - closes #6332 --- cmake/nuttx/px4_impl_nuttx.cmake | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cmake/nuttx/px4_impl_nuttx.cmake b/cmake/nuttx/px4_impl_nuttx.cmake index f1fc0f96551d..aafbfc1d23e5 100644 --- a/cmake/nuttx/px4_impl_nuttx.cmake +++ b/cmake/nuttx/px4_impl_nuttx.cmake @@ -255,12 +255,15 @@ function(px4_nuttx_add_export) # copy file(GLOB_RECURSE nuttx_all_files ${PX4_SOURCE_DIR}/NuttX/*) + file(RELATIVE_PATH nuttx_cp_src ${PX4_BINARY_DIR} ${PX4_SOURCE_DIR}/NuttX) add_custom_command(OUTPUT nuttx_copy_${CONFIG}.stamp COMMAND ${MKDIR} -p ${nuttx_src} - COMMAND rsync -a --delete --exclude=.git ${PX4_SOURCE_DIR}/NuttX/ ${nuttx_src}/ + COMMAND rsync -a --delete --exclude=.git ${nuttx_cp_src}/ ${CONFIG}/NuttX/ COMMAND ${TOUCH} nuttx_copy_${CONFIG}.stamp DEPENDS ${DEPENDS} ${nuttx_patches} ${nuttx_all_files} - COMMENT "Copying NuttX for ${CONFIG} with ${config_nuttx_config}") + COMMENT "Copying NuttX for ${CONFIG} with ${config_nuttx_config}" + WORKING_DIRECTORY ${PX4_BINARY_DIR} + ) add_custom_target(nuttx_copy_${CONFIG} DEPENDS nuttx_copy_${CONFIG}.stamp) # patch