MantisBT - CMake
View Issue Details
0014944CMakeCPackpublic2014-05-29 06:472016-06-10 14:31
Thierry Valentin 
Kitware Robot 
normalminoralways
closedmoved 
Linux 64 Debian JessieDebianJessie
CMake 2.8.12.1 
 
0014944: Add more control over individual components in a component-based configuration
Hello

I'm in the following situation:
I use Jenkins to build software binaries for several platforms. Each platform is built in a in separate job. I also need to produce the software documentation which is common to all platforms, so I only need a single job to build it.

I would like to configure the binary packages as follows:
- the package name should include the platform name, e.g: MyProject-1.0.0-Linux64-runtime.tar.gz
- the package includes the toplevel directory, such that uncompressing the package gives a directory MyProject-1.0.0/...

And I would like to configure the documentation packages as follows:
- the package name should NOT include the platform name, e.g: MyProject-1.0.0-doc-user.tar.gz
- the package does NOT include the toplevel directory, such that uncompressing the package gives the destination directory as specified in the INSTALL(FILES ... DESTINATION /doc/user) command in the CMakeLists.txt

This is currently impossible with the current version of CPack. But it could be possible if we could specify PACKAGE_FILE_NAME and INCLUDE_TOPLEVEL_DIRECTORY at the component level, as explained below:

# List of components:
set(CPACK_ARCHIVE_COMPONENT_INSTALL ON)
set(CPACK_COMPONENTS_GROUPING "IGNORE")
set(CPACK_COMPONENTS_ALL runtime doc-user)

# Default settings:
set(CPACK_PACKAGE_FILE_NAME ${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION})
set(CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY true)

# Per component settings:
set(CPACK_COMPONENT_RUNTIME_DISPLAY_NAME "Application Runtime")
set(CPACK_COMPONENT_RUNTIME_PACKAGE_FILE_NAME ${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_SYSTEM_NAME})

set(CPACK_COMPONENT_DOC-USER_DISPLAY_NAME "Application Documentation")
set(CPACK_COMPONENT_DOC-USER_INCLUDE_TOPLEVEL_DIRECTORY OFF)


Thanks

No tags attached.
Issue History
2014-05-29 06:47Thierry ValentinNew Issue
2016-06-10 14:29Kitware RobotNote Added: 0042555
2016-06-10 14:29Kitware RobotStatusnew => resolved
2016-06-10 14:29Kitware RobotResolutionopen => moved
2016-06-10 14:29Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0042555)
Kitware Robot   
2016-06-10 14:29   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.