Skip to content

Commit f2b1641

Browse files
author
Dicebot
committed
Add CPack configuration for debian packages
Allows to automatically generate .deb based on current generated `install` target. Some of package settings are taken from exiting CMake variables, some from host system.
1 parent 704ab30 commit f2b1641

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

CMakeCPack.cmake

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#
2+
# Common CPack configuration
3+
#
4+
set(CPACK_PACKAGE_NAME ${CMAKE_PROJECT_NAME})
5+
set(CPACK_PACKAGE_VERSION ${LDC_VERSION})
6+
set(CPACK_PACKAGE_CONTACT "public@dicebot.lv")
7+
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "LDC: LLVM D Compiler")
8+
9+
#
10+
# Debian specifics
11+
#
12+
execute_process(COMMAND dpkg --print-architecture OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
13+
set(CPACK_DEBIAN_PACKAGE_SECTION "devel")

CMakeLists.txt

+7
Original file line numberDiff line numberDiff line change
@@ -525,3 +525,10 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
525525
endif()
526526
install(DIRECTORY bash_completion.d/ DESTINATION ${BASH_COMPLETION_INST_DIR})
527527
endif()
528+
529+
#
530+
# Packaging
531+
#
532+
533+
include (CMakeCPack.cmake)
534+
include (CPack)

0 commit comments

Comments
 (0)