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.
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.
Continuing the subject of installing projects. This time I discuss details related to shared libraries
If it isn’t already, FetchContent should be your go-to solution for managing all non-binary dependencies. Forget git submodules, use FetchContent instead.
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.
It’s time to talk about CMake lists. The most obvious example of the lack of a type system in CMake.
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.
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.
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 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.