Hi All, I'm struggling to set custom names for cpack's components' archive names. I call cpack_add_component():
foreach(COMPONENT_NAME ${CPACK_COMPONENTS_ALL}) if (CMAKE_BUILD_TYPE STREQUAL "Debug") cpack_add_component(${COMPONENT_NAME} ARCHIVE_FILE ${PROJECT_NAME}-${COMPONENT_NAME}-${TOOLCHAIN_PREFIX}-debug-${CPACK_PACKAGE_VERSION}) else() cpack_add_component(${COMPONENT_NAME} ARCHIVE_FILE ${PROJECT_NAME}-${COMPONENT_NAME}-${TOOLCHAIN_PREFIX}-${CPACK_PACKAGE_VERSION}) endif() message(" ----------------------- ${PROJECT_NAME}-${COMPONENT_NAME}-${TOOLCHAIN_PREFIX}-${CPACK_PACKAGE_VERSION}") endforeach() This is the output of cmake: jenkins-slave@moo:~/workspace/platform/build$ docker run --rm -i -v /home/jenkins-slave/workspace/platform:/src -w /src/build -u 1007:1007 artifacts.aos-cloud.com:444/ede-prod-vm64 cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=/etc/ede/cmake/Modules/vm64.toolchain.cmake -DBUILD_NG=y -DCMAKE_INSTALL_PREFIX=Install .. /src/build/Install -- Boost version: 1.55.0 -- Found the following Boost libraries: -- filesystem -- program_options -- serialization -- system INCLUDE: /src/include ----------------------- platform-api-x86_64-vm-linux-gnu-0.0.1.0 ----------------------- platform-config-x86_64-vm-linux-gnu-0.0.1.0 ----------------------- platform-doc-x86_64-vm-linux-gnu-0.0.1.0 ----------------------- platform-example-x86_64-vm-linux-gnu-0.0.1.0 ----------------------- platform-runtime-x86_64-vm-linux-gnu-0.0.1.0 -- Configuring done -- Generating done -- Build files have been written to: /src/build The variables are being set: jenkins-slave@moo:~/workspace/platform/build$ tail CPackConfig.cmake set(CPACK_COMPONENT_CONFIG_ARCHIVE_FILE "platform-config-x86_64-vm-linux-gnu-0.0.1.0") # Configuration for component "doc" set(CPACK_COMPONENT_DOC_ARCHIVE_FILE "platform-doc-x86_64-vm-linux-gnu-0.0.1.0") # Configuration for component "example" set(CPACK_COMPONENT_EXAMPLE_ARCHIVE_FILE "platform-example-x86_64-vm-linux-gnu-0.0.1.0") # Configuration for component "runtime" set(CPACK_COMPONENT_RUNTIME_ARCHIVE_FILE "platform-runtime-x86_64-vm-linux-gnu-0.0.1.0") But in the end, I still get the wrong file names: jenkins-slave@moo:~/workspace/platform/build$ docker run --rm -i -v /home/jenkins-slave/workspace/platform:/src -w /src/build -u 1007:1007 artifacts.aos-cloud.com:444/ede-prod-vm64 cpack CPack: Create package using TBZ2 CPack: Install projects CPack: - Run preinstall target for: platform CPack: - Install project: platform CPack: - Install component: api CPack: - Install component: config CPack: - Install component: doc CPack: - Install component: example CPack: - Install component: runtime CPack: Create package CPack: - package: /src/build/platform-0.0.1.0-Linux-api.tar.bz2 generated. CPack: - package: /src/build/platform-0.0.1.0-Linux-config.tar.bz2 generated. CPack: - package: /src/build/platform-0.0.1.0-Linux-doc.tar.bz2 generated. CPack: - package: /src/build/platform-0.0.1.0-Linux-example.tar.bz2 generated. CPack: - package: /src/build/platform-0.0.1.0-Linux-runtime.tar.bz2 generated. Am I missing something? The cmake version is 3.2.2 Regards, Tomasz -- 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