diff --git a/01-basic/C-static-library/README.adoc b/01-basic/C-static-library/README.adoc index fc02cb1..71b37ba 100644 --- a/01-basic/C-static-library/README.adoc +++ b/01-basic/C-static-library/README.adoc @@ -84,7 +84,8 @@ target_link_libraries( hello_binary ---- This tells CMake to link the hello_library against the hello_binary executable -during link time. +during link time. It will also propogate any include directries with +PUBLIC+ or +INTERFACE+ scope + from the linked library target. An example of this being called by the compiler is diff --git a/01-basic/E-installing/README.adoc b/01-basic/E-installing/README.adoc index 792c8c9..0216dd4 100644 --- a/01-basic/E-installing/README.adoc +++ b/01-basic/E-installing/README.adoc @@ -80,7 +80,7 @@ install (FILES cmake-examples.conf Install a configuration file to the destination +${CMAKE_INSTALL_PREFIX}/etc+ -After `make install` has been run, CMake generated an install_manifest.txt file +After `make install` has been run, CMake generates an install_manifest.txt file which includes details on all installed files. [NOTE] diff --git a/01-basic/G-compile-flags/README.adoc b/01-basic/G-compile-flags/README.adoc index a1c808f..810d171 100644 --- a/01-basic/G-compile-flags/README.adoc +++ b/01-basic/G-compile-flags/README.adoc @@ -9,7 +9,7 @@ toc::[] CMake supports setting compile flags in a number of different ways: * using +target_compile_definitions()+ function - * using the +CMAKE_C_FLAGS+ and +CMAKE_CXX_FLAGS+ variables. + * using the +CMAKE_C_FLAGS+ and +CMAKE_CXX_FLAGS+ variables. The files in this tutorial are below: @@ -39,7 +39,7 @@ target_compile_definitions(cmake_examples_compile_flags This will cause the compiler to add the definition +-DEX3+ when compiling the target. -In the target was a library, and the scope +PUBLIC+ or +INTERFACE+ has been choosen the definition would also be included in any targets that link this target. +In the target was a library, and the scope +PUBLIC+ or +INTERFACE+ has been choosen the definition would also be included in any executables that link this target. For compiler options you can also use the +target_compile_options()+ link:https://cmake.org/cmake/help/v3.0/command/target_compile_options.html[function]. diff --git a/01-basic/H-third-party-library/README.adoc b/01-basic/H-third-party-library/README.adoc index 6b0ce4c..d5a8914 100644 --- a/01-basic/H-third-party-library/README.adoc +++ b/01-basic/H-third-party-library/README.adoc @@ -44,7 +44,7 @@ A basic example of finding boost is below: [source,cmake] ---- -find_package(Boost 1.54.0 REQUIRED COMPONENTS filesystem system) +find_package(Boost 1.46.1 REQUIRED COMPONENTS filesystem system) ---- The arguments are: @@ -93,8 +93,8 @@ ccmake or cmake-gui. ## Alias variables -Some modern CMake libraries export +ALIAS+ targets in their module files. For example, starting in later versions of CMake (v3.5+), -Boost uses this. +ALIAS+ targets make referencing found targets eaiser. This is similar to using your own alias targets for libraries. +Some modern CMake libraries export +ALIAS+ targets in their module files. For example, starting from v3.5+ of CMake, the +Boost module supports this. Similar to using your own ALIAS target for libraires, an +ALIAS+ in a module can make referencing found targets eaiser. In the case of Boost, you could replace the following from this example: @@ -102,7 +102,7 @@ In the case of Boost, you could replace the following from this example: * `Boost_FILESYSTEM_LIBRARY` with `Boost::filesystem` * `Boost_SYSTEM_LIBRARY` with `Boost::system`. If you include `Boost::filesystem` it automatically includes `Boost::system` -Using the new alias sytem, to replicate this example you only have to link the following: +Using the new alias sytem, to replicate this example you only have to link the following: [source,cmake] ----