<div dir="ltr">Hi,<div>A custom target in the CMakeLists.txt to run cpack seems to create a deadlock. For example the following code hangs after emitting:</div><div><div>CPack: Create package using RPM</div><div>CPack: Install projects</div>
<div>CPack: - Install directory: /home/agunturu/projects/rpm/.install/extra</div><div>CPack: - Run preinstall target for: Project</div></div><div><br></div><div><br></div><div><div>set(CPACK_COMPONENTS_ALL bin header extra)</div>
<div>set(CPACK_RPM_COMPONENT_INSTALL ON)<br></div><div>set(CPACK_RPM_PACKAGE_DEBUG &quot;ON&quot;)</div><div>set(CPACK_GENERATOR RPM)</div><div>set(CPACK_PACKAGE_NAME &quot;test&quot;)</div><div>set(CPACK_PACKAGE_VERSION 1.0)</div>
<div>set(CPACK_PACKAGE_RELEASE 1)</div><div>set(CPACK_PACKAGING_INSTALL_PREFIX &quot;/&quot;)</div><div>set(CPACK_INSTALLED_DIRECTORIES &quot;/home/agunturu/projects/rpm/.install/extra;extra&quot;)</div><div><br></div><div>
include(CPack)</div><div><br></div><div>add_custom_target(</div><div>  pkg-all ALL</div><div>  cpack --config CPackConfig.cmake</div><div>  DEPENDS test</div><div>  )</div></div><div><br></div><div>Looks like cpack runs the preinstall target which includes the custom target &quot;pkg-all&quot; itself. If the ALL keyword is removed from custom target it works fine with &quot;make pkg-all&quot;, but I was hoping to add the packaging step to ALL target list, so everything happens with just &quot;make&quot;.</div>
<div><br></div><div>Thanks,</div><div><br></div><div>-Anil</div><div><br></div></div>