Skip to content

Commit

Permalink
Add CPack configuration for debian packages
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Dicebot committed Feb 12, 2014
1 parent 704ab30 commit f2b1641
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
13 changes: 13 additions & 0 deletions CMakeCPack.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#
# Common CPack configuration
#
set(CPACK_PACKAGE_NAME ${CMAKE_PROJECT_NAME})
set(CPACK_PACKAGE_VERSION ${LDC_VERSION})
set(CPACK_PACKAGE_CONTACT "public@dicebot.lv")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "LDC: LLVM D Compiler")

#
# Debian specifics
#
execute_process(COMMAND dpkg --print-architecture OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
set(CPACK_DEBIAN_PACKAGE_SECTION "devel")
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -525,3 +525,10 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
endif()
install(DIRECTORY bash_completion.d/ DESTINATION ${BASH_COMPLETION_INST_DIR})
endif()

#
# Packaging
#

include (CMakeCPack.cmake)
include (CPack)

0 comments on commit f2b1641

Please sign in to comment.