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. -- 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: http://public.kitware.com/mailman/listinfo/cmake