cmake Packaging and Distributing Projects Creating a package for a built CMake project


To create a redistributable package (e.g. a ZIP archive or setup program), it's usually enough to simply invoke CPack using a syntax very similar to calling CMake:

cpack path/to/build/directory

Depending on the environment this will gather all required/installed files for the project and put them into a compressed archive or self-extracting installer.