Skip to content

Commit f5f5464

Browse files
committed
Adding basic CPack support for Archive packages
1 parent 5aaa97d commit f5f5464

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ else ()
9191
message(STATUS "Preparing core library build")
9292
add_subdirectory(src)
9393

94+
message(STATUS "Preparing CPack metadata")
95+
add_subdirectory(packaging)
96+
9497
message(WARNING "The dependencies are currently checked only for a basic Linux build, new ones need to be added for other platforms yet")
9598

9699
message(WARNING "Anything below this warning is a TODO not yet implemented.")

packaging/CMakeLists.txt

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
if (WIN32) #Starting simple with archive only packages
2+
set(CPACK_GENERATOR ZIP)
3+
else ()
4+
set(CPACK_GENERATOR TGZ)
5+
endif ()
6+
7+
set(CPACK_PACKAGE_NAME "aws-cpp-sdk")
8+
set(CPACK_PACKAGE_VENDOR "Amazon Web Services")
9+
set(CPACK_PACKAGE_INSTALL_DIRECTORY ${CPACK_PACKAGE_NAME})
10+
set(CPACK_PACKAGE_VERSION_MAJOR ${aws-cpp-sdk_VERSION_MAJOR})
11+
set(CPACK_PACKAGE_VERSION_MINOR ${aws-cpp-sdk_VERSION_MINOR})
12+
set(CPACK_PACKAGE_VERSION_PATCH ${aws-cpp-sdk_VERSION_PATCH})
13+
set(CPACK_VERBATIM_VARIABLES YES)
14+
set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_CURRENT_LIST_DIR}/../LICENSE)
15+
set(CPACK_RESOURCE_FILE_README${CMAKE_CURRENT_LIST_DIR}/../Readme.md)
16+
set(CPACK_MONOLITHIC_INSTALL OFF)
17+
set(CPACK_COMPONENTS_GROUPING IGNORE)
18+
include(CPack)
19+
cpack_add_component(aws-cpp-sdk_core
20+
DISPLAY_NAME Core
21+
DESCRIPTION "Core library"
22+
REQUIRED
23+
)

0 commit comments

Comments
 (0)