This example will show how to create a debian package (.deb) out of CMake-C++ program, which can be installed as an Ubuntu application.
The C++ program was taken from "Example of project structure for a C++ project with cmake"
Creation of the debian package will be executed on the executable example palindrome
CPack is a cross-platform software packaging tool, which is easy to use and very powerful.
With CMake version >= 2.4.2 CPack was distributed with CMake.
The generators concept is used from CMake, to abstract package generation on specific platforms, and it can be used with or without CMake.[1]
with the following 3 lines in palindrome_example/CMakeLists.txt the work is done to pack the palindrome programm into a .dep package
SET(CPACK_GENERATOR "DEB")
SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "MalikML") #required
INCLUDE(CPack)run the build.sh in the root to build and pack the program :)