<div dir="ltr"><div dir="ltr" style="font-family:arial,sans-serif;font-size:13px">Hi all,<div><br></div><div>Sorry to "hijack" this message, but I am <span class="">running</span> into the same problem. As part of my build I create zip files, and currently have this coupled to a normal library <span class="">target</span> (add_library). This works ok, but for some new features I need to create a zip file with a collection of libraries, so instead of coupling <span class="">CPack</span> to a library <span class="">target</span> I want to add it using a <span class="">custom</span> <span class="">target</span> which is coupled to the build chain (using ALL).</div>
<div><br></div><div>How can I do this without <span class="">running</span> in the problem mentioned by the topic starter? And what is the difference in this case between a normal (add_library) <span class="">target</span> and a <span class="">custom</span> <span class="">target</span>?</div>
<div><br></div><div>Thanks!</div><div><br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013-08-06 3:39 GMT+02:00 Anil Gunturu <span dir="ltr"><<a href="mailto:anil.gunturu@skyfab.com" target="_blank">anil.gunturu@skyfab.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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>
<br>--<br>
<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" target="_blank">http://cmake.org/cmake/help/support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" target="_blank">http://cmake.org/cmake/help/consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" target="_blank">http://cmake.org/cmake/help/training.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Met vriendelijke groet,<br><br>Alexander Broekhuis
</div>