To allow CMake to find the custom path, we need to set the CMAKE_PREFIX_PATH
environment variable.
Insert the following line in your .bashrc
file (usually located at ~/.bashrc
) or the RC file for whatever shell you're using (in my case ~/.zshrc
).
export CMAKE_PREFIX_PATH=~/borglab/libs:$CMAKE_PREFIX_PATH
Now we can build GTSAM with one simple cmake flag:
cmake -DCMAKE_INSTALL_PREFIX=<custom-path> ..
Now you should be able to run
make -j4 && make install