CMake Fundamentals Part 9

CMake Fundamentals Part 9

Once you’ve defined that installation process for your project, packaging it into an archive or a proper distribution is the next step that you may want to consider. In this part of the series, I introduce the basics of CPack – CMake’s support for packaging.

CMake Fundamentals Part 9

CMake Managing Resources

Not everything within your project tree is a source file that your compiler cares about, Invetiebly you’ll have some resources like .json configuration files, or similar. In this post, I discuss why it’s a good idea to make your build system aware of these resources and present a solution on how to do so.

CMake Fundamentals Part 9

CMake FetchContent

If it isn’t already, FetchContent should be your go-to solution for managing all non-binary dependencies. Forget git submodules, use FetchContent instead.

CMake Fundamentals Part 9

CMake Fundamentals Part 7

Once you’re done developing your shiny new library you better make sure that people can painlessly include it into their projects. In this part of the CMake Fundamentals series I demonstrate how to package and install libraries.

CMake Fundamentals Part 9

CMake Lists

It’s time to talk about CMake lists. The most obvious example of the lack of a type system in CMake.

CMake Fundamentals Part 9

CMake Fundamentals Part 6

Testing is an important consideration that needs to be made when setting up a C++ project. In this part of the series, I demonstrate how to do this using googletest and CTest.

CMake Fundamentals Part 9

CMake Generator-Expressions

Generator-expressions are a relatively new addition to the CMake language. The syntax may be a little off-putting at first, but once you get used to it, it becomes the go-to solution in many scenarios.

CMake Fundamentals Part 9

CMake Fundamentals Part 5

In this part of the series, I demonstrate the use of interface libraries for managing compiler configuration flags. I also introduce the include command.

CMake Fundamentals Part 9

CMake Variable Guidelines

CMake exposes a large set of built-in variables that provide the user with information about the project’s structure. Some of these variables – like CMAKE_SOURCE_DIR and PROJECT_SOURCE_DIR – may seem redundant, and the choice between the two not immediately obvious. In this post, I attempt to define a small set of guidelines that should help choose the right variable in a given context.