CMake Tutorial¶
Introduction¶
The CMake tutorial provides a step-by-step guide that covers common build system issues that CMake helps address. Seeing how various topics all work together in an example project can be very helpful.
Steps¶
The tutorial documentation and source code examples can be found in
the Help/guide/tutorial
directory of the CMake source code tree.
Each step has its own subdirectory containing code that may be used as a
starting point. The tutorial examples are progressive so that each step
provides the complete solution for the previous step.
- Step 1: Getting Started with CMake
- Step 2: CMake Language Fundamentals
- Step 3: Configuration and Cache Variables
- Step 4: In-Depth CMake Target Commands
- Step 5: In-Depth CMake Library Concepts
- Step 6: In-Depth System Introspection
- Step 7: Custom Commands and Generated Files
- Step 8: Testing and CTest
- Step 9: Installation Commands and Concepts
- Step 10: Finding Dependencies
- Step 11: Miscellaneous Features