[CMake] CPack: Create debian packge for each sub-project
DKLind
davidklind at gmail.com
Fri Jul 21 19:55:22 EDT 2017
I have a large project and I need to create a Debian package for each
sub-project (essentially each add_subdirectory).
I have been experimenting with CPack components as outlined here:
https://cmake.org/cmake/help/v3.8/module/CPackComponent.html?highlight=cpack_components_grouping#variable:CPACK_COMPONENTS_GROUPING
I haven't been able to get any CPACK_DEBIAN_<COMPONENT>_PACKAGE_XXX
variables to work. I've been using the syntax
CPACK_DEBIAN_${PROJECT_NAME}_PACKAGE_XXX.
I'm calling install as:
install(TARGETS ${PROGRAM_NAME} DESTINATION lib COMPONENT ${PROGRAM_NAME})
This way each sub-project is a unique component.
I would expect that CPackConfig.cmake would contain an entry for each
CPACK_DEBIAN_<COMPONENT>_PACKAGE_XXX variable. But, I'm seeing only
variables for the last sub-project that called "include(CPack)".
Here are my requrements:
1. Each package must have a unique control file info (version, description,
etc).
2. Each package filename must be
${PROGRAM_NAME}_${VERSION}_${ARCHITECTURE}.deb
--
View this message in context: http://cmake.3232098.n2.nabble.com/CPack-Create-debian-packge-for-each-sub-project-tp7595889.html
Sent from the CMake mailing list archive at Nabble.com.
More information about the CMake
mailing list