Browse Source

cmake: add new method to build deb package

cmd: cmake . && make  && make package
 output: WiingPi_lib-2.32.0-Linux.deb

Signed-off-by: sndnvaps <sndnvaps@gmail.com>
pull/48/head
sndnvaps 8 years ago
parent
commit
3991ddd2f3
2 changed files with 18 additions and 0 deletions
  1. +3
    -0
      .gitignore
  2. +15
    -0
      CMakeLists.txt

+ 3
- 0
.gitignore View File

@@ -10,3 +10,6 @@ CMakeFiles/
Makefile
cmake_install.cmake
install_manifest.txt
CPackConfig.cmake
CPackSourceConfig.cmake
_CPack_Packages/

+ 15
- 0
CMakeLists.txt View File

@@ -5,3 +5,18 @@ add_subdirectory(devLib)
add_subdirectory(gpio)
#add_subdirectory(pins)
add_subdirectory(wiringPi)

# Build deb package
# command to build *.deb
# cmake . && make && make package
SET(MAJOR_VERSION 2)
SET(MINOR_VERSION 32)
SET(PATCH_VERSION 0)
SET(CPACK_GENERATOR "DEB")
SET(CPACK_PACKAGE_VERSION_MAJOR "${MAJOR_VERSION}")
SET(CPACK_PACKAGE_VERSION_MINOR "${MINOR_VERSION}")
SET(CPACK_PACKAGE_VERSION_PATCH "${PATCH_VERSION}")
SET(CPACK_PACKAGE_DESCRIPTION "WiringPi Library for RaspberryPi")
SET(CPACK_PACKAGE_CONTACT "sndnvaps@gmail.com")
INCLUDE(CPack)


Loading…
Cancel
Save