Prerequisites
Before you dive into this chapter, you should have a good grasp of targets in CMake (covered briefly in Chapter 1, Kickstarting CMake, and Chapter 3, Creating a CMake Project, in detail). This chapter will build on top of that knowledge.
Please obtain this chapter's examples from this book's GitHub repository at https://github.com/PacktPublishing/CMake-Best-Practices. This chapter's exemplary content will be available in the chapter_4/
subfolder.