<!DOCTYPE html> | |
<html xmlns="http://www.w3.org/1999/xhtml" lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<title>CMake Tutorial — CMake 3.23.1 Documentation</title> | |
<link rel="stylesheet" href="../../_static/cmake.css" type="text/css" /> | |
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" /> | |
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script> | |
<script type="text/javascript" src="../../_static/jquery.js"></script> | |
<script type="text/javascript" src="../../_static/underscore.js"></script> | |
<script type="text/javascript" src="../../_static/doctools.js"></script> | |
<script type="text/javascript" src="../../_static/language_data.js"></script> | |
<link rel="shortcut icon" href="../../_static/cmake-favicon.ico"/> | |
<link rel="index" title="Index" href="../../genindex.html" /> | |
<link rel="search" title="Search" href="../../search.html" /> | |
<link rel="next" title="Step 1: A Basic Starting Point" href="A Basic Starting Point.html" /> | |
<link rel="prev" title="CPack WIX Generator" href="../../cpack_gen/wix.html" /> | |
</head><body> | |
<div class="related" role="navigation" aria-label="related navigation"> | |
<h3>Navigation</h3> | |
<ul> | |
<li class="right" style="margin-right: 10px"> | |
<a href="../../genindex.html" title="General Index" | |
accesskey="I">index</a></li> | |
<li class="right" > | |
<a href="A Basic Starting Point.html" title="Step 1: A Basic Starting Point" | |
accesskey="N">next</a> |</li> | |
<li class="right" > | |
<a href="../../cpack_gen/wix.html" title="CPack WIX Generator" | |
accesskey="P">previous</a> |</li> | |
<li> | |
<img src="../../_static/cmake-logo-16.png" alt="" | |
style="vertical-align: middle; margin-top: -2px" /> | |
</li> | |
<li> | |
<a href="https://cmake.org/">CMake</a> » | |
</li> | |
<li> | |
<a href="../../index.html">3.23.1 Documentation</a> » | |
</li> | |
</ul> | |
</div> | |
<div class="document"> | |
<div class="documentwrapper"> | |
<div class="bodywrapper"> | |
<div class="body" role="main"> | |
<div class="section" id="cmake-tutorial"> | |
<span id="guide:CMake Tutorial"></span><h1>CMake Tutorial<a class="headerlink" href="#cmake-tutorial" title="Permalink to this headline">¶</a></h1> | |
<div class="section" id="introduction"> | |
<h2>Introduction<a class="headerlink" href="#introduction" title="Permalink to this headline">¶</a></h2> | |
<p>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.</p> | |
</div> | |
<div class="section" id="steps"> | |
<h2>Steps<a class="headerlink" href="#steps" title="Permalink to this headline">¶</a></h2> | |
<p>The tutorial documentation and source code for examples can be found in | |
the <code class="docutils literal notranslate"><span class="pre">Help/guide/tutorial</span></code> 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.</p> | |
<div class="toctree-wrapper compound"> | |
<ul> | |
<li class="toctree-l1"><a class="reference internal" href="A Basic Starting Point.html">Step 1: A Basic Starting Point</a><ul> | |
<li class="toctree-l2"><a class="reference internal" href="A Basic Starting Point.html#build-and-run">Build and Run</a></li> | |
<li class="toctree-l2"><a class="reference internal" href="A Basic Starting Point.html#adding-a-version-number-and-configured-header-file">Adding a Version Number and Configured Header File</a></li> | |
<li class="toctree-l2"><a class="reference internal" href="A Basic Starting Point.html#specify-the-c-standard">Specify the C++ Standard</a></li> | |
<li class="toctree-l2"><a class="reference internal" href="A Basic Starting Point.html#rebuild">Rebuild</a></li> | |
</ul> | |
</li> | |
<li class="toctree-l1"><a class="reference internal" href="Adding a Library.html">Step 2: Adding a Library</a></li> | |
<li class="toctree-l1"><a class="reference internal" href="Adding Usage Requirements for a Library.html">Step 3: Adding Usage Requirements for a Library</a></li> | |
<li class="toctree-l1"><a class="reference internal" href="Installing and Testing.html">Step 4: Installing and Testing</a><ul> | |
<li class="toctree-l2"><a class="reference internal" href="Installing and Testing.html#install-rules">Install Rules</a></li> | |
<li class="toctree-l2"><a class="reference internal" href="Installing and Testing.html#testing-support">Testing Support</a></li> | |
</ul> | |
</li> | |
<li class="toctree-l1"><a class="reference internal" href="Adding System Introspection.html">Step 5: Adding System Introspection</a></li> | |
<li class="toctree-l1"><a class="reference internal" href="Adding a Custom Command and Generated File.html">Step 6: Adding a Custom Command and Generated File</a></li> | |
<li class="toctree-l1"><a class="reference internal" href="Packaging an Installer.html">Step 7: Packaging an Installer</a></li> | |
<li class="toctree-l1"><a class="reference internal" href="Adding Support for a Testing Dashboard.html">Step 8: Adding Support for a Testing Dashboard</a></li> | |
<li class="toctree-l1"><a class="reference internal" href="Selecting Static or Shared Libraries.html">Step 9: Selecting Static or Shared Libraries</a></li> | |
<li class="toctree-l1"><a class="reference internal" href="Adding Generator Expressions.html">Step 10: Adding Generator Expressions</a></li> | |
<li class="toctree-l1"><a class="reference internal" href="Adding Export Configuration.html">Step 11: Adding Export Configuration</a></li> | |
<li class="toctree-l1"><a class="reference internal" href="Packaging Debug and Release.html">Step 12: Packaging Debug and Release</a></li> | |
</ul> | |
</div> | |
<div class="toctree-wrapper compound"> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="sphinxsidebar" role="navigation" aria-label="main navigation"> | |
<div class="sphinxsidebarwrapper"> | |
<h3><a href="../../index.html">Table of Contents</a></h3> | |
<ul> | |
<li><a class="reference internal" href="#">CMake Tutorial</a><ul> | |
<li><a class="reference internal" href="#introduction">Introduction</a></li> | |
<li><a class="reference internal" href="#steps">Steps</a><ul> | |
</ul> | |
</li> | |
</ul> | |
</li> | |
</ul> | |
<h4>Previous topic</h4> | |
<p class="topless"><a href="../../cpack_gen/wix.html" | |
title="previous chapter">CPack WIX Generator</a></p> | |
<h4>Next topic</h4> | |
<p class="topless"><a href="A Basic Starting Point.html" | |
title="next chapter">Step 1: A Basic Starting Point</a></p> | |
<div role="note" aria-label="source link"> | |
<h3>This Page</h3> | |
<ul class="this-page-menu"> | |
<li><a href="../../_sources/guide/tutorial/index.rst.txt" | |
rel="nofollow">Show Source</a></li> | |
</ul> | |
</div> | |
<div id="searchbox" style="display: none" role="search"> | |
<h3 id="searchlabel">Quick search</h3> | |
<div class="searchformwrapper"> | |
<form class="search" action="../../search.html" method="get"> | |
<input type="text" name="q" aria-labelledby="searchlabel" /> | |
<input type="submit" value="Go" /> | |
</form> | |
</div> | |
</div> | |
<script type="text/javascript">$('#searchbox').show(0);</script> | |
</div> | |
</div> | |
<div class="clearer"></div> | |
</div> | |
<div class="related" role="navigation" aria-label="related navigation"> | |
<h3>Navigation</h3> | |
<ul> | |
<li class="right" style="margin-right: 10px"> | |
<a href="../../genindex.html" title="General Index" | |
>index</a></li> | |
<li class="right" > | |
<a href="A Basic Starting Point.html" title="Step 1: A Basic Starting Point" | |
>next</a> |</li> | |
<li class="right" > | |
<a href="../../cpack_gen/wix.html" title="CPack WIX Generator" | |
>previous</a> |</li> | |
<li> | |
<img src="../../_static/cmake-logo-16.png" alt="" | |
style="vertical-align: middle; margin-top: -2px" /> | |
</li> | |
<li> | |
<a href="https://cmake.org/">CMake</a> » | |
</li> | |
<li> | |
<a href="../../index.html">3.23.1 Documentation</a> » | |
</li> | |
</ul> | |
</div> | |
<div class="footer" role="contentinfo"> | |
© Copyright 2000-2022 Kitware, Inc. and Contributors. | |
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.1.2. | |
</div> | |
</body> | |
</html> |