<div dir="ltr">2018-07-19 18:00 GMT+02:00 dbegun via CMake <span dir="ltr"><<a href="mailto:cmake@cmake.org" target="_blank">cmake@cmake.org</a>></span>:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>I have a project where a lib and a binary requiring the lib are built in separate subdirs of the project root. Each dir contains its own CMakeLists.txt with build/install targets, and there is also a top level one, which mainly just adds subdirectories etc. <br></div><div>I want to add .deb package generation with cpack. When I place the following in either of the inner CMakeLists, a package containing the binary is built.<br></div><div><br></div><div>set(CPACK_BINARY_DEB "ON")<br></div><div>set(CPACK_GENERATOR "DEB")<br></div><div>set(CPACK_PACKAGE_NAME ${CMAKE_PROJECT_NAME})<br></div><div>set(CPACK_PACKAGE_VERSION ${PROJ_VERSION})<br></div><div>set(CPACK_PACKAGE_CONTACT "Denis Begun <a href="mailto:dbegun@allmonitoring.ru" target="_blank">dbegun@protonmail.</a>com")<br></div><div>set(CPACK_PACKAGE_DESCRIPTION "proj")<br></div><div>set(CPACK_DEBIAN_PACKAGE_<wbr>SHLIBDEPS ON)<br></div><div>include(CPack)<br></div><div><br></div><div>If I place it in both inner lists, nothing changes. If I place it in the top level CMakeList.txt, nothing is generated. The problem is that the package doesn't contain the library, so the binary can't run after installation.</div><div><br></div><div>What's the right direction to look in?</div></blockquote><div><br></div><div>Have you tried placing the include(CPack) at the bottom of the top level CMakeLists.txt after the rest of the CMakeLists.txt files have been included?<br><br></div><div>Regards,</div><div>Domen<br></div></div></div></div>