Package the Deb package with CMake

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.