Unfortunately it would take more than one run of CPack, but you may find useful something like:
in CMakeLists.txt: set( CPACK_PROJECT_CONFIG_FILE "${CMAKE_CURRENT_SOURCE_DIR}/CMakeCPackOptions.cmake" ) in CMakeCPackOptions.cmake: set( CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}" ) which would let you run for each component: cpack -G DEB -D CPACK_COMPONENTS_ALL="ComponentX" -P PackageNameForComponentX to produce a PackageNameForComponentX.deb for each run of cpack https://github.com/Kitware/CMake/blob/master/CMakeCPackOptions.cmake.in On Fri, Jan 30, 2015 at 6:05 AM, Rob Harris <rob.har...@gmail.com> wrote: > On 01/29/2015 11:24 PM, Iosif Neitzke wrote: >> >> Where for a single run of CPack, each component name produces a >> corresponding named .deb file or ...? > > Yes. Exactly. >> >> Have you tried using CPACK_PROJECT_CONFIG_FILE [0]? This allows you >> to set a few options at packaging time which can change the final >> output package file name. >> >> [0] http://www.cmake.org/cmake/help/v3.1/module/CPack.html > > Maybe I'm missing something, but how does that help me if there isn't an > accessible variable that contains the name of the component actively being > packaged? > > -R > -- 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