Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Minimal CMake
  • Table Of Contents Toc
  • Feedback & Rating feedback
Minimal CMake

Minimal CMake

By : Tom Hulton-Harrop
5 (1)
close
close
Minimal CMake

Minimal CMake

5 (1)
By: Tom Hulton-Harrop

Overview of this book

Minimal CMake guides you through creating a CMake project one step at a time. The book utilizes the author's unique expertise in game and engine development to craft compelling examples of how CMake can be used to build complex software. The chapters introduce concepts gradually, each one building on the last. Throughout the course of the book, you will progress from a simple console application all the way through to a full windowed app. The book will help you build a strong foundation in CMake that will translate to future projects. You'll learn how to integrate existing software libraries to enhance your app's functionality, how to build reusable libraries to share with others, and how to manage developing for multiple platforms simultaneously, including macOS, Windows, and Linux. You'll also find out how CMake facilitates testing and how to package your application ready for distribution. The book aims to not overwhelm you with everything there is to know about CMake. Instead, it focuses on the most relevant and important parts that will help you become productive quickly. By the end of this book, you will be a confident CMake user and will have gained the skills and experience to build and share your own libraries and applications.
Table of Contents (17 chapters)
close
close
Lock Free Chapter
1
Part 1: Starting Up
6
Part 2: Scaling Up
11
Part 3: Wrapping Up

Preface

We are thrilled you’ve decided to pick up Minimal CMake to either get introduced to CMake or to expand your knowledge of what is possible with it today. If you are interested in learning about how CMake can help you create libraries and applications, integrate with world-class open source software, or how it can be used to share your creations with others, you’re in the right place.

The title of this book is a little tongue-in-cheek, but the idea is to get to the good bits of CMake as fast as possible, skipping over some areas and avoiding others entirely. CMake is at its best when it does what you need it to do, and then gets out of your way. You don’t need to be a CMake expert to wield it effectively, and whether you’re new to CMake or have been away a while and are returning to see what’s changed, this book will have something for you.

An important aspect of this book is its focus on practical examples. It will take you step by step from a simple console application, all the way through to a full windowed app that runs on macOS, Windows, and Linux. Each chapter builds on the last, and every chapter is accompanied by source code split into multiple parts, each incrementally building on what came before. You will witness step by step how the journey unfolds and the reasoning and trade-offs behind every change.

In Part 1, we’ll make sure everyone has the tools they need to get CMake set up on their system of choice. We’ll then walk through some simple CMake scripts to get familiar with the most fundamental CMake commands. Next, we’ll turn our attention to a relatively new and incredibly powerful addition to CMake that makes integrating external libraries trivial. As well as showing how to integrate external code, we’ll show you how to make your own code sharable by creating a reusable library ourselves.

Part 2 builds on the foundations laid by Part 1. We’ll start by introducing some incredibly useful quality-of-life improvements that have been added to CMake in recent years. These eliminate a lot of tedious commands while keeping our CMake scripts clean and simple. We’ll also start to introduce larger dependencies and understand strategies for how to handle them, as well as how to create them ourselves. We’ll wrap things up by showing how to create a unified build that can configure and build our application, libraries, and dependencies all with a single command.

In Part 3, we’ll cover some other important areas where CMake can help us build and share better software. We’ll see how to add many kinds of tests to both our libraries and applications, as well as how to tie them together with the help of the companion tool, CTest. We’ll also gain an appreciation for how CMake can help us package our application, so it runs not just on our machine, but anywhere. We’ll wrap things up by reviewing what other great tools are available that can make working with CMake easier, and where to go next to continue building your CMake knowledge.

Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Minimal CMake
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist download Download options font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon