We will use the source code for the message library presented in Chapter 10, Writing an Installer, Recipe 3, Exporting your targets. The project tree consists of the following directories and files:
.
├── cmake
│ ├── coffee.icns
│ ├── Info.plist.in
│ └── messageConfig.cmake.in
├── CMakeCPack.cmake
├── CMakeLists.txt
├── INSTALL.md
├── LICENSE
├── src
│ ├── CMakeLists.txt
│ ├── hello-world.cpp
│ ├── Message.cpp
│ └── Message.hpp
└── tests
├── CMakeLists.txt
└── use_target
├── CMakeLists.txt
└── use_message.cpp
Since the emphasis in this recipe will be on effective usage of CPack, we will not comment on the source code itself. We will only add packaging directives in CMakeCPack.cmake, which we will discuss in a moment. In addition, we have added INSTALL.md and a LICENSE file: they contain installation instructions and the license for the project and are required by the packaging directives.