-
Book Overview & Buying
-
Table Of Contents
Minimal CMake
By :
Integrating CPack is deceptively simple; the majority of the work comes from the install commands we’ve already covered. The process involves setting several CPack-related variables (beginning with the CPACK_ prefix) to project-specific values, and then adding include(CPack) at the very end of our CMakeLists.txt file. In fact, with the current state of our CMakeLists.txt file from ch10/part-1/app, it’s possible to just add include(CPack) at the end, and then running cpack will do something useful.
One quick reminder is that CPack will default to installing a Release build, so ensure that you’ve built the Release configuration of the application; otherwise, invoking cpack will produce an error resembling the following:
file INSTALL cannot find "path/to/build/multi-ninja-super/Release/minimal-cmake_game-of-life_window": No such file or directory.
To invoke cpack directly, you need to tell it where to find a newly generated...