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.
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.

set(CPACK_BINARY_DEB "ON")
set(CPACK_GENERATOR "DEB")
set(CPACK_PACKAGE_NAME ${CMAKE_PROJECT_NAME})
set(CPACK_PACKAGE_VERSION ${PROJ_VERSION})
set(CPACK_PACKAGE_CONTACT "Denis Begun 
[dbegun@protonmail.](mailto:dbe...@allmonitoring.ru)com")
set(CPACK_PACKAGE_DESCRIPTION "proj")
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
include(CPack)

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.

What's the right direction to look in?

Sent with [ProtonMail](https://protonmail.com) Secure Email.
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake

Reply via email to