The source code is unchanged with respect to the previous recipe and the structure of the project is as follows:
.
├── cmake
│ └── messageConfig.cmake.in
├── CMakeLists.txt
├── src
│ ├── CMakeLists.txt
│ ├── hello-world.cpp
│ ├── Message.cpp
│ └── Message.hpp
└── tests
├── CMakeLists.txt
└── use_target
├── CMakeLists.txt
└── use_message.cpp
Notice that we have added a cmake subdirectory containing a messageConfig.cmake.in file. This file will contain our exported targets. We have also added a test to check whether the installation and export of the project work as intended.