aws-sdk-cpp
aws-sdk-cpp copied to clipboard
Enable CPack
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 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.
Can you give suggestions for the variables? Is "Amazon" OK for CPACK_PACKAGE_VENDOR?
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.
Ping?
This would be very useful.
https://github.com/aws/aws-sdk-cpp/issues/1888
It would be really nice to have CPack targets for specific modules and their dependencies. We are now using our local patch too