This is the code repository for Minimal CMake, published by Packt.
Learn the best bits of CMake to create and share your own libraries and applications
Every ch<n>/part-<n>
is a self contained project. Each builds on the last, incrementally adding functionality and behavior.
The preferred generator is Ninja Multi-Config
to keep examples consistent across Windows, macOS and Linux. Feel free to use an alternative generator if desired.
Minimal CMake is a practical guide to utilizing CMake's essential features. It focuses on what CMake can do for you, providing the tools and knowledge needed to leverage it effectively. Build your app, library, or game with confidence and efficiency.
This book covers the following exciting features:
- Set up projects for seamless cross-platform development
- Integrate external libraries to enhance your project’s functionality
- Create and share reusable libraries
- Manage complex software dependencies for improved maintainability
- Package and distribute applications efficiently
- Utilize top tools to streamline your CMake workflow
- Explore resources for continuous learning
If you feel this book is for you, get your copy today!
All of the code is organized into folders. For example, ch2.
The code will look like the following:
cmake_minimum_required(VERSION 3.28)
project(mc-array LANGUAGES C)
Following is what you need for this book: If you are a programmer skilled in C, C++, Swift, Objective-C, or C#, and keen on cross-platform development and open-source software, this book is for you. A solid grasp of CMake helps you to effectively utilize and create open-source libraries and applications. No prior knowledge of CMake is necessary, though familiarity with an imperative programming language (especially C and C++) is beneficial. While a basic understanding of the terminal is advantageous, comprehensive setup instructions will guide you across Windows, macOS, and Linux (Ubuntu).
With the following software and hardware list you can run all code files present in the book.
Software/ Hardware required | OS required/ Other requirements |
---|---|
C, C++, CMake, CTest, CPack, Visual Studio Code | Windows, macOS, Linux |
Tom Hulton-Harrop is a software developer with over 10 years of experience in game and engine development. Tom started his career in 2011 at Electronic Arts working on the Need for Speed series of racing games. In 2014, he joined Fireproof Games where he worked on Th e Room Th ree and a little-known VR game called Omega Agent. After a stint at a small start-up called Glowmade, Tom joined Amazon as part of the Lumberyard Game Engine team (later becoming Open 3D Engine). During this time, Tom became interested in open source development and started sharing multiple hobby projects on GitHub. It was this experience that led Tom to CMake, where he slowly came to appreciate the power and simplicity of the tool. Tom now works at a start-up called Amutri, helping deliver 3D experiences to engineering, manufacturing, and lighting customers.