From b370e2d20d131478dc593ee31a2dff5d8d3f9024 Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Mon, 29 May 2017 02:04:00 +0200 Subject: Trick to always execute popule http and data dir This will fake cmake to make it believe that the output produced by custom_command never exists so it have to re execute the command... Change-Id: I3836510d5c522b8f23991669eb07b08bf17aba5f Signed-off-by: Romain Forlot --- cmake/common.cmake | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'cmake') diff --git a/cmake/common.cmake b/cmake/common.cmake index 04d144f..ee95906 100644 --- a/cmake/common.cmake +++ b/cmake/common.cmake @@ -123,20 +123,22 @@ macro(project_targets_populate) add_custom_target(${POPULE_PACKAGE_TARGET} DEPENDS ${PACKAGE_BINDIR}/${P}${TARGET}) add_dependencies(populate ${POPULE_PACKAGE_TARGET}) elseif(${T} STREQUAL "HTDOCS") - add_custom_command(OUTPUT ${PACKAGE_HTTPDIR} + add_custom_command(OUTPUT ${PACKAGE_HTTPDIR}-xx DEPENDS ${TARGET} COMMAND mkdir -p ${PACKAGE_HTTPDIR} + COMMAND touch ${PACKAGE_HTTPDIR} COMMAND cp -r ${BD}/${P}${OUT}/* ${PACKAGE_HTTPDIR} ) - add_custom_target(${POPULE_PACKAGE_TARGET} DEPENDS ${PACKAGE_HTTPDIR}) + add_custom_target(${POPULE_PACKAGE_TARGET} DEPENDS ${PACKAGE_HTTPDIR}-xx) add_dependencies(populate ${POPULE_PACKAGE_TARGET}) elseif(${T} STREQUAL "DATA") - add_custom_command(OUTPUT ${PACKAGE_DATADIR} + add_custom_command(OUTPUT ${PACKAGE_DATADIR}-xx DEPENDS ${TARGET} COMMAND mkdir -p ${PACKAGE_DATADIR} + COMMAND touch ${PACKAGE_DATADIR} COMMAND cp -r ${BD}/${P}${OUT} ${PACKAGE_DATADIR} ) - add_custom_target(${POPULE_PACKAGE_TARGET} DEPENDS ${PACKAGE_DATADIR}) + add_custom_target(${POPULE_PACKAGE_TARGET} DEPENDS ${PACKAGE_DATADIR}-xx) 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