Technical requirements
Before you dive further into this chapter, it is recommended to take a look at Chapter 1, Kickstarting CMake. This chapter follows the teaching-over-example approach, so it is recommended to obtain this chapter’s example content from here: https://github.com/PacktPublishing/CMake-Best-Practices---2nd-Edition/tree/main/chapter13. For all the examples, assume that you will be using the container provided by this project: https://github.com/PacktPublishing/CMake-Best-Practices---2nd-Edition/.
Let’s start by learning some basics about reusability in CMake.