Hi,<div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The only issue would be that you have to &quot;call&quot; (i.e. build) the new<br>
custom target explicitely instead of relying on POST BUILD.<br></blockquote><div><br></div><div>I had hoped it would be as simple as adding a DEPENDS to the custom target, or something similar. </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>
Note that may be I didn&#39;t catch your usage so may be you can<br>
send us the concerned bits of your CMakeLists.txt<br></blockquote><div><br></div><div>What I have is a macro which takes care of adding a library, this library is wrapped in a zip file using CPack. Together with the library there is a manifest file which needs to be added to the zip file.</div>
<div><br></div><div>I would like to be able to track changes to this manifest file and trigger an out-of-date so that the zip is is recreated when building again.</div><div><br></div><div>The macro I use:</div><div><br></div>
<div>=======</div><div>MACRO(bundle)</div><div>    PARSE_ARGUMENTS(BUNDLE &quot;SOURCES;FILES;DIRECTORIES&quot; &quot;&quot; ${ARGN})</div><div>    LIST(GET BUNDLE_DEFAULT_ARGS 0 BUNDLE_NAME)</div><div><br></div><div>    add_library(${BUNDLE_NAME} SHARED ${BUNDLE_SOURCES})</div>
<div>    install (DIRECTORY META-INF DESTINATION . COMPONENT ${BUNDLE_NAME})</div><div>    install (TARGETS ${BUNDLE_NAME} DESTINATION . COMPONENT ${BUNDLE_NAME})</div><div><br></div><div>    if (BUNDLE_FILES)</div><div>        install (FILES ${BUNDLE_FILES} DESTINATION . COMPONENT ${BUNDLE_NAME})</div>
<div><span class="s1">    endif</span>(BUNDLE_FILES)</div><div><br></div><div>    if (BUNDLE_DIRECTORIES)</div><div>        install (DIRECTORY ${BUNDLE_DIRECTORIES} DESTINATION . COMPONENT ${BUNDLE_NAME})</div><div><span class="s1">    endif</span>(BUNDLE_DIRECTORIES)</div>
<div><br></div><div>    SET(__bundleConfig ${CMAKE_CURRENT_BINARY_DIR}/CPackConfig-${BUNDLE_NAME}-bundle.cmake)</div><div>    SET(BUNDLE_BIN_DIR ${CMAKE_CURRENT_BINARY_DIR})</div><div>    CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/<span class="s1">cmake</span>/CPackConfig.in ${__bundleConfig} @ONLY)</div>
<div>    ADD_CUSTOM_COMMAND(TARGET ${BUNDLE_NAME}</div><div>        POST_BUILD</div><div>        COMMAND ${CPACK_COMMAND} ARGS --<span class="s1">config</span> ${__bundleConfig}</div><div>        WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/bundles</div>
<div>    )</div><div>    SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES ${PROJECT_BINARY_DIR}/bundles/${BUNDLE_NAME}.<span class="s1">zip</span>)</div><div>ENDMACRO(bundle)</div><div><br></div></div><div>
<br></div>-- <br>Met vriendelijke groet,<br><br>Alexander Broekhuis<br>