Professional CMake:

A Practical Guide

Structured learning, best practice and real world advice from one of the CMake co-maintainers

Slider
Book front cover

Professional CMake: A Practical Guide is the handbook for every CMake user, from beginner to seasoned veteran. With over 400 pages of real-world advice presented in a logical, structured format, it progressively teaches how to make the most of the CMake family of tools. Packed with the latest best practices for the 3.x series right up to the latest 3.12 release, topics cover the complete software pipeline, from the very initial setup of a project through to testing, packaging and integration with other projects.

Use the book as a step-by-step learning guide or cherry-pick topics based on areas of interest, it’s up to you. Distributed in electronic form (PDF) with a detailed table of contents, navigation is easy, the content is fully searchable and all future updates are included in the purchase price. All payments and product downloads are handled securely by SendOwl.

Price: US$30 (excl. VAT for EU purchases)

Book Contents

Part I: Fundamentals
  1. Introduction
  2. Setting Up A Project
  3. A Minimal Project
  4. Building Simple Targets
  5. Variables
  6. Flow Control
  7. Using Subdirectories
  8. Functions And Macros
  9. Properties
  10. Generator Expressions
  11. Modules
  12. Policies

Part II: Builds In Depth
  1. Build Type
  2. Compiler And Linker Essentials
  3. Language Requirements
  4. Target Types
  5. Custom Tasks
  6. Working With Files
  7. Specifying Version Details
  8. Libraries
  9. Toolchains And Cross Compiling
  10. Apple Features
Part III: The Bigger Picture
  1. Finding Things
  2. Testing
  3. Installing
  4. Packaging
  5. External Content
  6. Project Organization

Every chapter concludes with a Recommended Practices section, which even experienced CMake users should find helpful. Upcoming chapters will cover features for Qt, building documentation, speeding up builds and automating code checks such as clang-tidy, include-what-you-use, etc. Release notes are also available.

FAQ

Can I copy the book to read on my various devices?

Yes, you are free to make copies for your own personal use. The copyright message from the book states the following:

  • The original purchaser may make personal copies exclusively for their own use on their electronic devices, provided that all reasonable steps are taken to ensure that only the original purchaser has access to such copies.
  • Permission is given to use any of the code samples in this work without restriction. Attribution is not required.
Can I purchase a printed version?

The book is only available in electronic form at this time. Buyers are permitted to print their own personal copy if they so wish.

Is the book available in other electronic formats?

There are no plans to provide other electronic formats at this time. The option of supporting the epub format was explored, but it was found that the smaller form factor led to relatively poor readability, especially for code samples.

Is the book available from other places like Safari Books Online, Amazon, etc.?

The book is only available directly from the Crascit website. There are no plans to make it available through other distributors or content providers.

Is there any other freely available material by the same author?