Here are just a few of the commonly used:
1 Version control information:
Set (Major_version 1) set (minor_version 0) set (patch_version 0) set (cpack_generator "DEB") Set (Cpack_package_ve Rsion_major "${major_version}") Set (Cpack_package_version_minor "${minor_version}") Set (Cpack_package_version_ PATCH "${patch_version}") Set (Cpack_debian_package_depends "Libc6 (>= 2.3.1-6)") Set (Cpack_package_description "p RO-CC service ") SET (cpack_package_contact" [email protected] ") include (Cpack)
2 Add some additional dependent files
SET (libs_dir "$ENV {dbxml_dir}/lib") Install (FILES ${cmake_source_dir}/pro-cc.conf destination/etc/init) Install ( FILES ${libs_dir}/libdb-4.8.so ${libs_dir}/libdbxml-2.5.so ${libs_dir}/libxerces-c-3.0.so ${LIBS_DIR}/ Libxqilla.so.5 ${libs_dir}/libxqilla.so.5.0.2 Destination/usr/lib)
The second sentence above means to copy the pro-cc.conf file to/etc/init when it is installed
The third sentence means to install the library file under/usr/lib
To generate a Deb package
Make Package
The above fields are not explained, very basic. Do not understand can Baidu or CMake official website to see the document. On the Cpack official website, Cpack can pack deb, but never find how to load additional library files into the package, some of the online offers are not trying to succeed. Just use the install.
See also: Http://stackoverflow.com/questions/15461556/cpack-cannot-find-libraries-target-doesnt-exist-in-this-directory
Http://www.cmake.org/Wiki/CMake:Component_Install_With_CPack
Package the Deb package with CMake