Using T'Pau C++ Kernal in a CMake Project
This guide shows how to use T'Pau C++ Kernal in a CMake project.
You can use an installed version of the library, or you can use it directly from its build directory.
If you don't have the library yet, please refer to the Building the Library tutorial.
Adding the Library to Your CMake Project
If you're using an installed version of the library, add the following to your top level CMakeLists.txt:
Todo
Add instructions for using the library from its build directory.
Using the Library in Your Code
All headers are in the tpau-cpp-kernal directory. For example, to use the Value class, include the following header:
All classes and functions are in the tpau::cpp_kernal namespace. For example, to use the Value class, you can write:
Link against the Library
To link against the library, add the following to your target's CMakeLists.txt:
This also adds the include directories to the compiler's search path. This means that the target of any source files that include headers from T'Pau C++ Kernal needs to be linked against the library, even a static convenience library.