mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-08 12:30:20 +08:00
CMake: updated to support latest g2oConfig.cmake (using targets)
This commit is contained in:
+8
-1
@@ -412,7 +412,14 @@ IF(WITH_G2O)
|
||||
FIND_PACKAGE(G2O QUIET)
|
||||
IF(G2O_FOUND)
|
||||
MESSAGE(STATUS "Found g2o: ${G2O_INCLUDE_DIRS}")
|
||||
ENDIF(G2O_FOUND)
|
||||
ELSE()
|
||||
FIND_PACKAGE(g2o QUIET)
|
||||
IF(g2o_FOUND)
|
||||
SET(G2O_FOUND ${g2o_FOUND})
|
||||
SET(G2O_CPP11 1)
|
||||
MESSAGE(STATUS "Found g2o (targets)")
|
||||
ENDIF(g2o_FOUND)
|
||||
ENDIF()
|
||||
ENDIF(WITH_G2O)
|
||||
|
||||
IF(WITH_GTSAM)
|
||||
|
||||
@@ -351,14 +351,29 @@ IF(WITH_TORO)
|
||||
ENDIF(WITH_TORO)
|
||||
|
||||
IF(G2O_FOUND)
|
||||
SET(INCLUDE_DIRS
|
||||
IF(g2o_FOUND)
|
||||
SET(LIBRARIES
|
||||
${LIBRARIES}
|
||||
g2o::core
|
||||
g2o::solver_cholmod
|
||||
g2o::solver_eigen
|
||||
g2o::solver_pcg
|
||||
g2o::solver_csparse
|
||||
g2o::csparse_extension
|
||||
g2o::types_slam2d
|
||||
g2o::types_slam3d
|
||||
g2o::types_sba
|
||||
)
|
||||
ELSE()
|
||||
SET(INCLUDE_DIRS
|
||||
${INCLUDE_DIRS}
|
||||
${G2O_INCLUDE_DIRS}
|
||||
)
|
||||
SET(LIBRARIES
|
||||
)
|
||||
SET(LIBRARIES
|
||||
${LIBRARIES}
|
||||
${G2O_LIBRARIES}
|
||||
)
|
||||
)
|
||||
ENDIF()
|
||||
SET(SRC_FILES
|
||||
${SRC_FILES}
|
||||
optimizer/g2o/edge_se3_xyzprior.cpp
|
||||
|
||||
Reference in New Issue
Block a user