Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nanopb/nanopb.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'extra/FindNanopb.cmake')
-rw-r--r--extra/FindNanopb.cmake5
1 files changed, 4 insertions, 1 deletions
diff --git a/extra/FindNanopb.cmake b/extra/FindNanopb.cmake
index d2ca7d2..928c012 100644
--- a/extra/FindNanopb.cmake
+++ b/extra/FindNanopb.cmake
@@ -172,10 +172,13 @@ function(NANOPB_GENERATE_CPP SRCS HDRS)
# same build directory with different python/protobuf versions
# as the binary build directory is discarded across builds.
#
+ # Notice: copy_directory does not copy the content if the directory already exists.
+ # We therefore append '/' to specify that we want to copy the content of the folder. See #847
+ #
add_custom_command(
OUTPUT ${NANOPB_GENERATOR_EXECUTABLE} ${GENERATOR_CORE_SRC}
COMMAND ${CMAKE_COMMAND} -E copy_directory
- ARGS ${NANOPB_GENERATOR_SOURCE_DIR} ${GENERATOR_PATH}
+ ARGS ${NANOPB_GENERATOR_SOURCE_DIR}/ ${GENERATOR_PATH}
VERBATIM)
set(GENERATOR_CORE_PYTHON_SRC)