Skip to content
Snippets Groups Projects
Commit ad6e48c3 authored by fredowski's avatar fredowski Committed by Daniel Agar
Browse files

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
parent e5a7945a
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment