From ef38e4fe94c9f32adf572bf1df68e78f4eaaffa2 Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Mon, 22 May 2017 18:39:55 +0200 Subject: 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 --- cmake/macros.cmake | 10 +++++----- 1 file 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]") -- cgit 1.2.3-korg