0.23.2: make g2o sba type check more portable (vcpkg build issue) (#1597)

* make g2o sba type check more portable

* try fixing latest g2o build
This commit is contained in:
matlabbe
2025-10-13 22:54:35 -07:00
committed by GitHub
parent edebf18043
commit 5cc16e371c
4 changed files with 48 additions and 37 deletions

View File

@@ -90,14 +90,10 @@ typedef g2o::LinearSolverCSparse<SlamBlockSolver::PoseMatrixType> SlamLinearCSpa
typedef g2o::LinearSolverCholmod<SlamBlockSolver::PoseMatrixType> SlamLinearCholmodSolver;
#endif
// We use G2O_SRC_DIR to know we are version after December 24 2020
// We check if g2o/types/sba/sba_utils.h exists to know we use a version after December 24 2020
// where VertexSBAPointXYZ has been renamed to VertexPointXYZ
// (g2o: 0fcccb302787e70ff19f65e70fb103a1295b33a2)
//
// VCPKG commented G2O_SRC_DIR from their port so we cannot use
// G2O_SRC_DIR on windows to deduce it, we then assume it is the
// latest version without VertexSBAPointXYZ
#if defined(G2O_SRC_DIR) or defined(WIN32)
#ifdef RTABMAP_G2O_WITH_SBA_UTILS
namespace g2o {
typedef VertexPointXYZ VertexSBAPointXYZ;
}