Skip to content

Use TOPP-RA as submodule in a CMake C++ project. #222

Answered by maxpla3
maxpla3 asked this question in Q&A
Discussion options

You must be logged in to vote

Solution:
First, add toppra as a git submodule in your project.
Then, add following lines to the CMakeLists.txt of your project (assuming your executable is called "main"):

target_link_libraries ("main" toppra)

target_include_directories ("main" PUBLIC ${PROJECT_SOURCE_DIR}/toppra/cpp/src)

set (BUILD_TESTS OFF CACHE BOOL "Build Gtests")
set (BUILD_SHARED_LIBS OFF CACHE BOOL "Build shared libraries")
set (PYTHON_BINDINGS OFF CACHE BOOL "Build bindings for Python")
add_subdirectory (toppra/cpp)

Set BUILD_SHARED_LIBS to ON if you'd like to use shared libs.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@hungpham2511
Comment options

Answer selected by maxpla3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants