From NAMIC Wiki
Revision as of 14:25, 30 April 2007 by Will (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Home < CPackSummary


The purpose of CPack is to enable cross-platform packaging and distribution of software. Packaging software across multiple platforms has been a difficult, error prone and time consuming process. CPack is an adjunct component of CMake that addresses this issue. It uses the concept of generators from CMake, where a generator abstracts the platform specific packaging issues. It then produces native package distributions such as RPMs (Linux) and Windows installers. These distributions can then be directly disseminated to the NAMIC community.

Typical Usage

CPack is used in conjunction with CMake.


CPack is written in C++. It uses the CMake configuration language, contained in a simple ASCII text file (i.e., the CMakeLists.txt file) consisting of CMake commands. The form of the CPack commands is "ACTION Arguments". There is also support for conditional constructs.


CMake runs across most combinations of hardware, operating system, and compilers.

Software Dependencies

CMake is written in the C/C++ languages, and requires a C++ compiler to build CPack from source code. Otherwise if downloading CPack, no external software is required.

Documentation, Tutorials and Examples

Online documentaion is available from the CMake web site.

The book Mastering CMake is available for purchase from Kitware or

In addition, ITK and VTK both use CMake to control their build process. Examing the CMakeLists.txt files found in these projects can be instructive for the advanced user.

Revision Control

CMake uses CVS to manage the source code. Instructions for obtaining CMake CVS access are available online. (We strongly recommend that you use the pre-compiled binaries; building CMake from source code is only for the advanced user.)

Size of Community

There are over 250 subscribers to the CMake mailing list.


The CMake Copyright is an open-source, Berkely-style license. It allows unrestricted use, including use in commercial products. (The only exceptions are software modules found in the patented software directory.)