aws-sdk-cpp icon indicating copy to clipboard operation
aws-sdk-cpp copied to clipboard

Enable CPack

Open Bu11etmagnet opened this issue 6 years ago • 7 comments

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.

Bu11etmagnet avatar Apr 12 '18 12:04 Bu11etmagnet

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

singku avatar Apr 13 '18 05:04 singku

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

Bu11etmagnet avatar Apr 13 '18 09:04 Bu11etmagnet

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.

psalvaggio avatar Dec 17 '18 15:12 psalvaggio

Ping?

Bu11etmagnet avatar Dec 01 '19 10:12 Bu11etmagnet

This would be very useful.

richardjkendall avatar Mar 08 '20 07:03 richardjkendall

https://github.com/aws/aws-sdk-cpp/issues/1888

jmklix avatar Jun 20 '22 17:06 jmklix

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

yumais avatar Mar 08 '23 22:03 yumais