January 2025
Intermediate to advanced
266 pages
7h 3m
English
Now that we are up and running with CMake, one of the most useful features to be aware of is FetchContent. FetchContent is a CMake feature that allows you to bring external libraries (also called dependencies) into your project. It only takes a few lines of code and is quick and convenient to use. It does rely on the dependency also using CMake, but the good news is that a considerable proportion of open source software written in C and C++ uses CMake to build itself. Even if the dependency doesn’t use CMake, adding CMake support is often quite easy and makes consuming the library a lot simpler.
We’ll see how to use FetchContent in the context of our project to introduce some new useful functionality ...
Read now
Unlock full access