Update to minimum CMake 3.5

And modernise some examples.
This commit is contained in:
Thom Troy
2018-03-18 17:23:57 +00:00
parent 54e75664c1
commit b81da6f68b
52 changed files with 303 additions and 212 deletions

View File

@@ -17,7 +17,8 @@ $ tree
├── cmake-examples.conf
├── CMakeLists.txt
├── include
│   └── Hello.h
│   └── installing
│   └── Hello.h
├── README.adoc
└── src
├── Hello.cpp
@@ -26,7 +27,7 @@ $ tree
* link:CMakeLists.txt[] - Contains the CMake commands you wish to run
* link:cmake-examples.conf[] - An example configuration file
* link:include/Hello.h[] - The header file to include
* link:include/installing/Hello.h[] - The header file to include
* link:src/Hello.cpp[] - A source file to compile
* link:src/main.cpp[] - The source file with main
@@ -72,6 +73,16 @@ install (TARGETS cmake_examples_inst
----
====
[source,cmake]
----
install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/
DESTINATION include)
----
Install the header files for developing against the +cmake_examples_inst+ library
into the +${CMAKE_INSTALL_PREFIX}/include+ directory.
[source,cmake]
----
install (FILES cmake-examples.conf