The Colon Case - Now Building with CMake


It's been a few months since I last posted about my next game, The Colon Case.  I've actually been reasonably (sporadically?) active on the project, but took a little detour over the past month to learn how to build C++ projects using CMake.

I'm happy to say that the source code for The Colon Case has succesfully been migrated from Visual Studio projects, to CMake build scripts.  I still have plenty to learn about CMake, and CMake best practices.  But I think I've managed to gather enough knowledge to say that I'll be building *all* of my C++ projects with CMake going forward.  I'm particularly happy with the FetchContent module that was made available in version 3.11 (March 2018).

During the transition to CMake, I made a three-part Youtube series over on my new Riley Entertainment Games channel:

Learning CMake Part 1 - The Basics - This covers some of the basics of CMake, some takeaways for those transitioning from Visual Studio projects, how to copy resource files, and how to use Github Actions for Continuous Integration.

Learning CMake Part 2 - Building Libraries - Shows how to build static and shared libraries.

Learning CMake Part 3 - Managing Dependencies - Introduces the FetchContent module, which can be used to download and manage third-party library dependencies.  With FetchContent, I was able to bring in libraries like JsonCpp and SFML as part of the CMake build script; without having to download them separately.

The SFML library presents some challenges for Linux.  If I want to build The Colon Case on Linux, I'll have some more things to look into.  But I'm hopeful that this little CMake side-project has put me on the right path to cross-platform support...

Leave a comment

Log in with itch.io to leave a comment.