Browse Source

cmake - check directory existence before copy_directory (#10402)

Starting with cmake version 3.12 the cmake -E copy_directory
command fails if the source directory does not exist. This results
in a build failure. This fix creates the source directory before
the copy which does not harm if the source directory exists.

Closes: #10368
sbg
fredowski 7 years ago committed by Daniel Agar
parent
commit
ad6e48c372
  1. 1
      ROMFS/CMakeLists.txt

1
ROMFS/CMakeLists.txt

@ -105,6 +105,7 @@ endif() @@ -105,6 +105,7 @@ endif()
add_custom_command(OUTPUT romfs_extras.stamp
COMMAND ${CMAKE_COMMAND} -E make_directory ${romfs_gen_root_dir}/extras/
COMMAND ${CMAKE_COMMAND} -E make_directory ${PX4_BINARY_DIR}/romfs_extras/
COMMAND ${CMAKE_COMMAND} -E copy_directory ${PX4_BINARY_DIR}/romfs_extras/ ${romfs_gen_root_dir}/extras/
COMMAND ${CMAKE_COMMAND} -E touch romfs_extras.stamp
DEPENDS

Loading…
Cancel
Save