Skip to content

Enable CPack #843

Closed
Closed

Description

@Bu11etmagnet

In our project, we use the following local patch:

$ cat cpack.diff 
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 83024b94a..1945cc145 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -169,6 +169,13 @@ endif()
 
 add_sdks()
 
+SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "AWS C++ SDK")
+SET(CPACK_PACKAGE_VENDOR "Amazon")
+SET(CPACK_PACKAGE_VERSION "${PROJECT_VERSION}")
+SET(CPACK_GENERATOR "RPM;DEB")
+SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "Package fairy")
+INCLUDE(CPack)
+
 # for user friendly cmake usage
 include(setup_cmake_find_module)

After this, I can
$ cd <builddir> ; make; cpack -G RPM
on a RedHat-like system or
$ cd <builddir> ; make; cpack -G DEB
on a Debian-like system, to create an installable package file.

It would be nice to have this by default, with proper values for the CMake variables, of course.

Activity

  1. singku commented on Apr 13, 2018

    @singku
    Contributor

    @Bu11etmagnet Thank you very much for sharing this. We have a similar task in our backlog, which would enable building of RPM, DEB and windows installation packages, but currently is not prioritized. It would be nicer if you can create PR for DEB and RPM, then credits is yours.

  2. Bu11etmagnet commented on Apr 13, 2018

    @Bu11etmagnet
    Author

    Can you give suggestions for the variables? Is "Amazon" OK for CPACK_PACKAGE_VENDOR?

  3. psalvaggio commented on Dec 17, 2018

    @psalvaggio

    Has there been any movement on this? This would be a very welcome addition, as I currently have to maintain packaging scripts for this library, which break a lot because of new libraries and it seems recently that some things were split out into submodules.

  4. Bu11etmagnet commented on Dec 1, 2019

    @Bu11etmagnet
    Author

    Ping?

  5. richardjkendall commented on Mar 8, 2020

    @richardjkendall

    This would be very useful.

  6. jmklix commented on Jun 20, 2022

    @jmklix
    Member
  7. added
    p2This is a standard priority issue
    on Dec 2, 2022
  8. yumais commented on Mar 8, 2023

    @yumais

    It would be really nice to have CPack targets for specific modules and their dependencies. We are now using our local patch too

  9. kai-ion commented on Sep 23, 2026

    @kai-ion
    Contributor

    Converting this to a Discussion. It's an improvements we plan to pursue over time rather than one actionable change with a near-term milestone, so a Discussion better fits collecting the specifics and design input.

  10. locked and limited conversation to collaborators on Sep 23, 2026
  11. converted this issue into a discussion #3942 on Sep 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    CmakeCmake related submissionsfeature-requestA feature should be added or improved.p2This is a standard priority issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions