diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2017-05-29 02:04:00 +0200 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2018-10-15 18:22:20 +0200 |
commit | 620459039f27a28c376907727f794451bbdf8e94 (patch) | |
tree | 06ba8c2f99446267cacc7cf202cc00aaa2c0627b /cmake/common.cmake | |
parent | 6d595cb47be5fe2e5c77aaf8e35d0d7d9680e43f (diff) |
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 <romain.forlot@iot.bzh>
Diffstat (limited to 'cmake/common.cmake')
-rw-r--r-- | cmake/common.cmake | 10 |
1 files changed, 6 insertions, 4 deletions
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]") |