I need to modify a C++ project to use Cereal library. The build system of this project is based on CMake. Since Cereal is a header only library and also uses CMake, I expect this to be a pretty simple task. I tried editing the CMakeLists.txt
with:
include(ExternalProject)
ExternalProject_Add(cereal
GIT_REPOSITORY [email protected]:USCiLab/cereal.git
CMAKE_ARGS -DJUST_INSTALL_CEREAL=ON -DSKIP_PORTABILITY_TEST=ON -DBUILD_TESTS=OFF
PREFIX ${CMAKE_INSTALL_PREFIX})
but somehow cmake
tries to install cereal
under /usr/local
. I appreciate any help that can point me in the right direction.
I am not sure if this is the best thing to do, but the following works. The trick is not to install anything and set include directory correctly.