MRPT  2.0.2
Using MRPT from your CMake project

MRPT defines exported projects that can be imported as usual in modern CMake:

# Find all MRPT libraries:
find_package(MRPT 1.9.9 COMPONENTS poses gui OPTIONAL_COMPONENTS vision)
message(STATUS "MRPT_VERSION: ${MRPT_VERSION}")
message(STATUS "MRPT_LIBRARIES: ${MRPT_LIBRARIES}")
# Define your own targets:
add_executable(myapp main.cpp)
# Link against MRPT: this will also add all required flags,
# include directories, etc.
target_link_libraries(myapp ${MRPT_LIBRARIES})

or individually like:

# Find MRPT libraries, one by one:
find_package(mrpt-poses)
find_package(mrpt-gui)
# Define your own targets:
add_executable(myapp main.cpp)
# Link against MRPT: this will also add all required flags,
# include directories, etc.
target_link_libraries(myapp
)

Prior to MRPT 2.0.0, the correct way to find for MRPT was:

# Find MRPT libraries:
find_package(MRPT REQUIRED poses gui)
add_executable(myapp main.cpp)
target_link_libraries(myapp ${MRPT_LIBRARIES})



Page generated by Doxygen 1.8.14 for MRPT 2.0.2 Git: 9b4fd2465 Mon May 4 16:59:08 2020 +0200 at lun may 4 17:26:07 CEST 2020