-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Minimal CMake
By :
Returning to our ongoing project, let’s begin by identifying an area of code that is ripe for reuse: array. Let’s pull this functionality out to a separate library so that we can consume it from our main application and potentially reuse it in other projects in the future (or share it with other developers who might want to try it out).
Before we look at the CMakeLists.txt file, let’s make some minor changes to the project structure to ensure our library is following common conventions. These changes aren’t strictly needed (the libraries we included earlier in Chapter 3, Using FetchContent with External Dependencies (timer_lib and as-c-math), do not adhere to these guidelines), but they’re useful to know and will help keep our projects clean and organized as they grow.
Starting with the array/ folder we saw throughout Chapter 2, Hello, CMake!, and Chapter 3, Using FetchContent...