mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-29 08:34:37 +08:00
Ensure build paths for dependencies are searched in FindPackage(Ceres)
- Append to hint locations used by FindPackage scripts for public dependencies (glog & Eigen) the locations of the dependencies when Ceres was built. - This means that the user should not have to supply them again when using find_package(Ceres) even if they are installed in a non-standard location. Change-Id: I9550de91025ba47f01f1ea3c3fefe80fe38d14ff
This commit is contained in:
@@ -126,6 +126,8 @@ SET(CERES_INCLUDE_DIRS ${CERES_INCLUDE_DIR})
|
||||
# Eigen.
|
||||
# Flag set during configuration and build of Ceres.
|
||||
SET(CERES_EIGEN_VERSION @EIGEN_VERSION@)
|
||||
# Append the locations of Eigen when Ceres was built to the search path hints.
|
||||
LIST(APPEND EIGEN_INCLUDE_DIR_HINTS @EIGEN_INCLUDE_DIR@)
|
||||
# Search quietly s/t we control the timing of the error message if not found.
|
||||
FIND_PACKAGE(Eigen ${CERES_EIGEN_VERSION} EXACT QUIET)
|
||||
IF (EIGEN_FOUND)
|
||||
@@ -141,6 +143,10 @@ LIST(APPEND CERES_INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS})
|
||||
# Glog.
|
||||
# Flag set during configuration and build of Ceres.
|
||||
SET(CERES_USES_MINIGLOG @MINIGLOG@)
|
||||
# Append the locations of glog when Ceres was built to the search path hints.
|
||||
LIST(APPEND GLOG_INCLUDE_DIR_HINTS @GLOG_INCLUDE_DIR@)
|
||||
GET_FILENAME_COMPONENT(CERES_BUILD_GLOG_LIBRARY_DIR @GLOG_LIBRARY@ PATH)
|
||||
LIST(APPEND GLOG_LIBRARY_DIR_HINTS ${CERES_BUILD_GLOG_LIBRARY_DIR})
|
||||
IF (CERES_USES_MINIGLOG)
|
||||
SET(MINIGLOG_INCLUDE_DIR ${CERES_INCLUDE_DIR}/ceres/internal/miniglog)
|
||||
IF (NOT EXISTS ${MINIGLOG_INCLUDE_DIR})
|
||||
|
||||
Reference in New Issue
Block a user