CMake: updated to support latest g2oConfig.cmake (using targets)

This commit is contained in:
matlabbe
2021-03-02 18:17:09 +00:00
parent ea4cc7cb6c
commit 4e4207a6dd
2 changed files with 27 additions and 5 deletions

View File

@@ -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)