<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 "ON")</div><div>set(CPACK_GENERATOR RPM)</div><div>set(CPACK_PACKAGE_NAME "test")</div><div>set(CPACK_PACKAGE_VERSION 1.0)</div>
<div>set(CPACK_PACKAGE_RELEASE 1)</div><div>set(CPACK_PACKAGING_INSTALL_PREFIX "/")</div><div>set(CPACK_INSTALLED_DIRECTORIES "/home/agunturu/projects/rpm/.install/extra;extra")</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 "pkg-all" itself. If the ALL keyword is removed from custom target it works fine with "make pkg-all", but I was hoping to add the packaging step to ALL target list, so everything happens with just "make".</div>
<div><br></div><div>Thanks,</div><div><br></div><div>-Anil</div><div><br></div></div>