Embed with CPM.cmake
CPM.cmake is a nice wrapper around the CMake FetchContent function.
Check if you have Cmake 3.14+ installed:
1 | |
Install CPM.cmake and then use this command to add Matplot++ to your build script:
1 2 3 4 5 6 7 | |
Then add this header to your source files:
1 | |
However, in larger projects, it's always recommended to look for Matplot++ with find_package before including it as a subdirectory to avoid ODR errors.
You can use:
1 | |
in your build script to let CPM.cmake do that for you.