Creating an installable package with CPack
So far, we have seen how CMake can structure software projects. Although CMake is the star of the show, CMake has some powerful friends too. It is time to introduce you to CPack, the packaging tool of CMake. It is shipped with CMake installations by default. It allows you to leverage existing CMake code to generate platform-specific installations and packages. CPack is similar to CMake in concept. It is based on generators that generate packages instead of build system files. The following table shows the available CPack generator types as of version 3.21.3:
Generator Name |
Description |
7Z |
7-zip archive |
DEB |
Debian package |
External |
CPack external package |
IFW |
Qt... |