diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2017-05-22 18:39:55 +0200 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2018-10-15 18:22:20 +0200 |
commit | ce86801334933a2f4a1e78570a417d3ad37b4128 (patch) | |
tree | f73d8ecd11557698d69e7a247cfbd79f58908aa7 | |
parent | 437f5634e79e21d49663256f0bd2f7d25e7bc373 (diff) |
Improve populate htdocs and data target types.
Copy the directory contents instead of the directory itself to avoid copying
directory inside the target directory if it exists.
Change-Id: I152287e59dc1f0a00fcf538f270519128459dc42
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
-rw-r--r-- | cmake/macros.cmake | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/cmake/macros.cmake b/cmake/macros.cmake index ba771d6..55419f2 100644 --- a/cmake/macros.cmake +++ b/cmake/macros.cmake @@ -112,18 +112,18 @@ macro(project_targets_populate) elseif(${T} STREQUAL "HTDOCS") add_custom_command(OUTPUT ${PACKAGE_HTTPDIR} DEPENDS ${TARGET} - COMMAND mkdir -p ${PROJECT_PKG_DIR} - COMMAND cp -r ${BD}/${P}${OUT} ${PACKAGE_HTTPDIR} + COMMAND mkdir -p ${PROJECT_PKG_DIR}/${PACKAGE_HTTPDIR} + COMMAND cp -r ${BD}/${P}${OUT}/* ${PACKAGE_HTTPDIR} ) add_custom_target(${POPULE_PACKAGE_TARGET} DEPENDS ${PACKAGE_HTTPDIR}) add_dependencies(populate ${POPULE_PACKAGE_TARGET}) elseif(${T} STREQUAL "DATA") add_custom_command(OUTPUT ${PACKAGE_DATADIR} DEPENDS ${TARGET} - COMMAND mkdir -p ${PROJECT_PKG_DIR} - COMMAND cp -r ${BD}/${P}${OUT} ${PACKAGE_DATADIR} + COMMAND mkdir -p ${PROJECT_PKG_DIR}/${PACKAGE_DATADIR} + COMMAND cp -r ${BD}/${P}${OUT}/* ${PACKAGE_DATADIR} ) - add_custom_target(${POPULE_PACKAGE_TARGET} DEPENDS ${PACKAGE_HTTPDIR}) + add_custom_target(${POPULE_PACKAGE_TARGET} DEPENDS ${PACKAGE_DATADIR}) add_dependencies(populate ${POPULE_PACKAGE_TARGET}) endif(${T} STREQUAL "BINDING") # elseif(${CMAKE_BUILD_TYPE} MATCHES "[Dd][Ee][Bb][Uu][Gg]") |