-
Check if the library is Header only
-
Download the boost copy tool
-
Add you dependancy to ./extern/boost using the following command
$ bcp --path=/path/to/boost/dir scoped_ptr /extern
Where scoped_ptr is the header you want to add
- Create a build directory
$ mkdir build
$ cd build
- Run CMake
Use the command cmake [options] ..
Relevant options are:
-DCMAKE_BUILD_TYPE=Debug
Build with debug flags
-DCMAKE_BUILD_TYPE=Release
Build with Release flags
-DPACKAGE_TESTS=ON
Build tests
Minimal example: $ cmake ..
Note: you have to delete your build directory and start from scratch if you want to use new options
- Compile
$ cmake --build .
If you chose to build the tests, you can run them with the following command
from the build folder ./test/tests