CPack
lastmod 2026-11-10created 2016-02-294 edits
CPack is a packaging tool included with CMake that bundles build output into packages for distribution such as DEB, RPM, NSIS installers, TGZ, and ZIP. You specify the package name, version, dependencies, and so on with CPACK_* variables in CMakeLists.txt and add include(CPack), then build packages with the cpack command or the package target. Each generator has its own variables, and Debian packages follow the CPackDeb settings.