Fixed ceres linker issue with floam dependency (if WITH_CERES is OFF)

This commit is contained in:
matlabbe
2022-09-27 23:35:13 +00:00
parent 74c6e9cfec
commit 87faea7a85
2 changed files with 14 additions and 10 deletions

View File

@@ -844,9 +844,9 @@ IF(NOT GTSAM_FOUND)
ELSE()
SET(CONF_DEPENDENCIES ${CONF_DEPENDENCIES} ${GTSAM_LIBRARIES})
ENDIF()
IF(NOT WITH_CERES OR NOT CERES_FOUND)
IF(NOT CERES_FOUND)
SET(CERES "//")
ENDIF(NOT WITH_CERES OR NOT CERES_FOUND)
ENDIF(NOT CERES_FOUND)
IF(NOT WITH_TORO)
SET(TORO "//")
ENDIF(NOT WITH_TORO)
@@ -1340,8 +1340,12 @@ ELSE()
MESSAGE(STATUS " *With GTSAM = NO (GTSAM not found)")
ENDIF()
IF(WITH_CERES AND CERES_FOUND)
IF(CERES_FOUND)
IF(WITH_CERES)
MESSAGE(STATUS " *With Ceres ${Ceres_VERSION} = YES (License: BSD)")
ELSE()
MESSAGE(STATUS " *With Ceres ${Ceres_VERSION} = YES (License: BSD, WITH_CERES=OFF but it is enabled by okvis or floam dependencies)")
ENDIF()
ELSEIF(NOT WITH_CERES)
MESSAGE(STATUS " *With Ceres = NO (WITH_CERES=OFF)")
ELSE()