<div dir="ltr">Hello,<div><br></div><div>I have a CMake project that uses CPack to generate a tgz file.  When I build it and run CPack, it produces project-X.Y.Z in the build directory (where X, Y, and Z are ${CPACK_PACKAGE_VERSION_MAJOR}/minor/patch).</div><div><br></div><div>I recently decided to add a new "super project" that builds both my project and a few other external projects.  In a new top-level CMakeLists.txt file I have:</div><div><br></div><div>project(super)</div><div>cmake_minimum_required(VERSION 3.1)</div><div><br></div><div># build my project</div><div>ExternalProject_Add(my_project</div><div>   SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/my_project</div><div>   BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/my_project</div><div>   BUILD_COMMAND ${CMAKE_COMMAND} --build .</div><div>   INSTALL_COMMAND ${CMAKE_CPACK_COMMAND})</div><div><br></div><div># Build another custom target</div><div>add_custom_target(custom ALL</div><div>   WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/custom</div><div>   COMMAND make</div><div>)</div><div><br></div><div>The super project, works well.  It does build both my original project (via external project) and another item by invoking make with add_custom_target.</div><div><br></div><div>I would like to generate a tgz file that contains both the output of my custom target and the output of running CPack on my external project, but can't figure out how to do so.  I've tried to use CPack again (one level higher) or just forego CPack and manually create a tar file, but both approaches led to new challenges.  Is there some way to generate a new package containing the output of an external project?</div><div><br></div><div>Thanks for any help,</div><div>Zac</div></div>