-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Minimal CMake
By :
So far, we’ve used several of CMake’s lower-level commands to download, build, and install our new SDL 2 dependency. It’s important to understand this manual process to gain a deep appreciation of one of CMake’s most useful features, ExternalProject_Add.
To the uninitiated, using ExternalProject_Add can be quite confusing. One of the fundamental things to understand is that ExternalProject_Add must run as a separate step before you try to build a project that uses the dependencies it makes available. With everything we’ve just discussed when it comes to installing manually, this should now make more sense. ExternalProject_Add is essentially syntactic sugar to streamline the process we outlined. There are some clever ways to more tightly integrate it into our main build (see the discussion of super builds in Chapter 8, Using Super Builds to Simplify Onboarding), but for now, we’ll continue...