mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-21 01:12:11 +00:00
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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user