From efb4c921cb01c5047a8dc5bbe3413c0bf793fe10 Mon Sep 17 00:00:00 2001 From: Thom Troy Date: Tue, 1 Dec 2015 11:31:28 +0000 Subject: [PATCH] Update toc and headings #3 --- 01-basic/H-third-party-library/README.adoc | 30 +++++----------------- 1 file changed, 7 insertions(+), 23 deletions(-) diff --git a/01-basic/H-third-party-library/README.adoc b/01-basic/H-third-party-library/README.adoc index f2e9891..7099736 100644 --- a/01-basic/H-third-party-library/README.adoc +++ b/01-basic/H-third-party-library/README.adoc @@ -1,14 +1,10 @@ = Including Third Party Library - :toc: :toc-placement!: toc::[] - -[[intro]] -Introduction ------------- +# Introduction 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 @@ -30,20 +26,14 @@ $ tree * CMakeLists.txt - Contains the CMake commands you wish to run * main.cpp - The source file with main -[[requirements]] -Requirements -~~~~~~~~~~~~ +# Requirements This example requires the boost libraries to be installed in a default system 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 "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. -[[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 if the package is available on the system. @@ -87,9 +75,7 @@ else() endif() ---- -[[exported_variables]] -Exported Variables -^^^^^^^^^^^^^^^^^^ +## Exported Variables 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` @@ -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 ccmake or cmake-gui. -[[building-the-example]] -Building the Example -~~~~~~~~~~~~~~~~~~~~ +# Building the Example [source,bash] ----