The basic examples in this directory show how the setup a CMake project, set compile flags, create and link executables and libraries, and install them.
The examples included are
-
hello-cmake. A hello world example.
-
hello-headers. A slightly more complicated hello world example, using seperate source and include folders.
-
static-library. An example using a static library.
-
shared-library. An example using a shared library.
-
installing. Shows how to create a 'make install' target that will install binaries and libraries.
-
build-type. An example showing how to set a default build and optimization flags for your project.
-
compile-flags. Shows how to set additional compile flags.
-
third-party-library. Shows an example of how to link third party libraries.
-
compiling-with-clang. An example of invoking the clang compiler.
-
building-with-ninja - Shows how to generate ninja build files
-
imported-targets - Shows how to link boost using the new imported targets
-
cpp-standard - Shows various methods to set the C++ standard