CPack multiple packages

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

CPack multiple packages

CMake mailing list
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 [hidden email]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 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 | Threaded
Open this post in threaded view
|

Re: CPack multiple packages

Domen Vrankar
2018-07-19 18:00 GMT+02:00 dbegun via CMake <[hidden email]>:
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 [hidden email]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?

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?

Regards,
Domen

--

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