-
Book Overview & Buying
-
Table Of Contents
Minimal CMake
By :
Fantastic work making it to this point; there was a lot to take in. In this chapter, we covered what FetchContent is and why you might want to use it. We touched on how to extract useful functionality in your CMakeLists.txt file and then walked through the FetchContent_Declare and FetchContent_MakeAvailable commands in detail. We saw where to find commits and tags for projects on GitHub, and then how to use FetchContent to bring in a simple dependency to enhance our app. We then looked at how to link to our dependency (along with a few alternative approaches) to ensure we could use the code in our project. Finally, we covered how to override settings exposed by dependencies in our CMakeLists.txt file and discussed a small update to our Game of Life application.
This is another significant achievement under your belt. Being able to effectively understand and use FetchContent is an incredibly valuable skill. It unlocks a wealth of software (open source or otherwise) for easy...