When developing your own code that relies on OMPL, you have several options:
Install OMPL and use your own build system: First, if you are installing OMPL “by hand” (i.e., not through your package manager), run the following commands in your OMPL build directory:
cmake -DCMAKE_INSTALL_PREFIX=/some/path make install
Below are the specifics for different build systems:
CMake: For ease of use with CMake, we have included a CMake file that finds OMPL: FindOMPL.cmake. This normally gets installed in the CMake module path, so if you use CMake in your own project, you can simply use this command in your CMakeLists.txt: find_package(OMPL)
. This will define the following variables:
OMPL_FOUND
- OMPL was foundOMPL_LIBRARIES
- The OMPL libraryOMPLAPP_LIBRARIES
- The OMPL.app libraryOMPL_INCLUDE_DIRS
- The OMPL include directory-I/usr/local/include”
(or, e.g., “-I${HOME}/ompl/src”
) to your compile flags, and “-L/usr/local/lib
-lompl”
(or, e.g., “-L${HOME}/ompl/build/Release/lib
-lompl”
) to your link flags. The compile and link flags can also be obtained using “pkg-config
–cflags ompl” and “pkg-config
–libs ompl”, respectively.OMPL_LIBS
and OMPL_CFLAGS
if OMPL was found.Eclipse CDT: Below is a brief set of instructions for getting OMPL to work with Eclipse CDT. These instructions have been verified to work with Eclipse Indigo with CDT.