Skip to content

Instantly share code, notes, and snippets.

@varunagrawal
Created May 3, 2023 18:52
Show Gist options
  • Save varunagrawal/e499519021db609a3203d43252f7e420 to your computer and use it in GitHub Desktop.
Save varunagrawal/e499519021db609a3203d43252f7e420 to your computer and use it in GitHub Desktop.

Building GTSAM with custom path

CMake

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

Build 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment