Skip to content

Enable CPack #843

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Bu11etmagnet opened this issue Apr 12, 2018 · 7 comments
Open

Enable CPack #843

Bu11etmagnet opened this issue Apr 12, 2018 · 7 comments
Labels
Cmake Cmake related submissions feature-request A feature should be added or improved. p2 This is a standard priority issue

Comments

@Bu11etmagnet
Copy link

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.

@singku
Copy link
Contributor

singku commented Apr 13, 2018

@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.

@Bu11etmagnet
Copy link
Author

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

@psalvaggio
Copy link

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.

@justnance justnance added feature-request A feature should be added or improved. and removed enhancement labels Apr 19, 2019
@Bu11etmagnet
Copy link
Author

Ping?

@richardjkendall
Copy link

This would be very useful.

@jmklix
Copy link
Member

jmklix commented Jun 20, 2022

#1888

@jmklix jmklix added the p2 This is a standard priority issue label Dec 2, 2022
@yumais
Copy link

yumais commented Mar 8, 2023

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

@jmklix jmklix added the Cmake Cmake related submissions label May 3, 2024
amit-schreiber-firebolt pushed a commit to firebolt-analytics/aws-sdk-cpp that referenced this issue May 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cmake Cmake related submissions feature-request A feature should be added or improved. p2 This is a standard priority issue
Projects
None yet
Development

No branches or pull requests

7 participants