Skip to content

Commit

Permalink
cmake/CPackConfig.cmake: Allow building of debian package with CPack
Browse files Browse the repository at this point in the history
  • Loading branch information
Jerry Jacobs committed Feb 28, 2017
1 parent c816cb4 commit 5b69f25
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions cmake/CPackConfig.cmake
Expand Up @@ -12,4 +12,16 @@ elseif (WIN32)
file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/dist/windows")
set (CPACK_INSTALL_PREFIX "")
set(CPACK_OUTPUT_FILE_PREFIX "${CMAKE_BINARY_DIR}/dist/windows")
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux" AND EXISTS "/etc/debian_version")
message(STATUS "Debian-based Linux OS detected")
set(CPACK_GENERATOR "DEB")

if ("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64")
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${PROJECT_VERSION}-amd64" )
endif()

set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://github.com/texane/stlink")
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Jerry Jacobs")
set(CPACK_PACKAGE_CONTACT "jerry.jacobs@xor-gate.org")
set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "STM32 stlink programmer tools")
endif()

0 comments on commit 5b69f25

Please sign in to comment.