Update toc and headings #3

This commit is contained in:
Thom Troy
2015-12-01 11:31:28 +00:00
parent aa058a144c
commit efb4c921cb

View File

@@ -1,14 +1,10 @@
= Including Third Party Library = Including Third Party Library
:toc: :toc:
:toc-placement!: :toc-placement!:
toc::[] toc::[]
# Introduction
[[intro]]
Introduction
------------
Nearly all non-trivial projects will have a requirement for including third party Nearly all non-trivial projects will have a requirement for including third party
libraries, headers, or programs. CMake has support for finding the path to these tools using libraries, headers, or programs. CMake has support for finding the path to these tools using
@@ -30,20 +26,14 @@ $ tree
* CMakeLists.txt - Contains the CMake commands you wish to run * CMakeLists.txt - Contains the CMake commands you wish to run
* main.cpp - The source file with main * main.cpp - The source file with main
[[requirements]] # Requirements
Requirements
~~~~~~~~~~~~
This example requires the boost libraries to be installed in a default system This example requires the boost libraries to be installed in a default system
location. location.
[[concepts]] # Concepts
Concepts
~~~~~~~~
[[find_package]] ## Finding a Package
Finding a Package
^^^^^^^^^^^^^^^^^
As mentioned above the `find_package()` function will search for CMake modules in the formant As mentioned above the `find_package()` function will search for CMake modules in the formant
"FindXXX.cmake" from the list of folders in `CMAKE_MODULE_PATH`. The exact "FindXXX.cmake" from the list of folders in `CMAKE_MODULE_PATH`. The exact
@@ -68,9 +58,7 @@ Boost includes can take more arguments and also make use of other variables.
More complex setups are provided in later examples. More complex setups are provided in later examples.
[[include-found]] ## Checking if the package is found
Checking if the package is found
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Most included packages will set a variable `XXX_FOUND`, which can used to check Most included packages will set a variable `XXX_FOUND`, which can used to check
if the package is available on the system. if the package is available on the system.
@@ -87,9 +75,7 @@ else()
endif() endif()
---- ----
[[exported_variables]] ## Exported Variables
Exported Variables
^^^^^^^^^^^^^^^^^^
After a package is found it will often export variables which can inform the user After a package is found it will often export variables which can inform the user
where to find the library, header, or executable files. Similar to the `XXX_FOUND` where to find the library, header, or executable files. Similar to the `XXX_FOUND`
@@ -105,9 +91,7 @@ The variables exported in this example include:
In some cases you can also check these variables by examining the cache using In some cases you can also check these variables by examining the cache using
ccmake or cmake-gui. ccmake or cmake-gui.
[[building-the-example]] # Building the Example
Building the Example
~~~~~~~~~~~~~~~~~~~~
[source,bash] [source,bash]
---- ----