<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">dbegun@protonmail.</a>com")<br></div><div>set(CPACK_PACKAGE_DESCRIPTION "proj")<br></div><div>set(CPACK_DEBIAN_PACKAGE_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><div><br></div><div class="protonmail_signature_block"><div class="protonmail_signature_block-user protonmail_signature_block-empty"><br></div><div class="protonmail_signature_block-proton">Sent with <a href="https://protonmail.com" target="_blank">ProtonMail</a> Secure Email.<br></div></div><div><br></div>