aboutsummaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-05-22 18:39:55 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-05-22 18:39:55 +0200
commitef38e4fe94c9f32adf572bf1df68e78f4eaaffa2 (patch)
treee343f946cfebbc58eeb765a68ad6a0d7f521bf1f /cmake
parentc6315b89558170864a04e9b56bcde72f4902d4ca (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>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/macros.cmake10
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]")