mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-29 08:34:37 +08:00
Add additional search paths for glog & Eigen on Windows.
- When built with CMake on Windows, the default install prefix will be C:/Program Files/<PROJECT_NAME> (instead of /usr/local on Linux / OS X. - Due to an upstream change in Eigen >= 3.3, the project name for Eigen changed to Eigen3 from Eigen, thus changing the default install location. - glog, uses the project name “google-glog”, thus when it is build with CMake, this becomes it’s default install path instead of just glog when built with other tools. - This patch adds both of these paths to the default search list on Windows. Change-Id: I987b502fed0f6e685c504fd47fd504307aad8bef
This commit is contained in:
@@ -91,8 +91,6 @@ unset(EIGEN_FOUND)
|
||||
|
||||
# Search user-installed locations first, so that we prefer user installs
|
||||
# to system installs where both exist.
|
||||
#
|
||||
# TODO: Add standard Windows search locations for Eigen.
|
||||
list(APPEND EIGEN_CHECK_INCLUDE_DIRS
|
||||
/usr/local/include
|
||||
/usr/local/homebrew/include # Mac OS X
|
||||
@@ -102,7 +100,8 @@ list(APPEND EIGEN_CHECK_INCLUDE_DIRS
|
||||
# Additional suffixes to try appending to each search path.
|
||||
list(APPEND EIGEN_CHECK_PATH_SUFFIXES
|
||||
eigen3 # Default root directory for Eigen.
|
||||
Eigen/include/eigen3 ) # Windows (for C:/Program Files prefix).
|
||||
Eigen/include/eigen3 # Windows (for C:/Program Files prefix) < 3.3
|
||||
Eigen3/include/eigen3 ) # Windows (for C:/Program Files prefix) >= 3.3
|
||||
|
||||
# Search supplied hint directories first if supplied.
|
||||
find_path(EIGEN_INCLUDE_DIR
|
||||
|
||||
@@ -225,7 +225,9 @@ if (NOT GLOG_FOUND)
|
||||
glog/include
|
||||
glog/Include
|
||||
Glog/include
|
||||
Glog/Include)
|
||||
Glog/Include
|
||||
google-glog/include # CMake installs with project name prefix.
|
||||
google-glog/Include)
|
||||
|
||||
list(APPEND GLOG_CHECK_LIBRARY_DIRS
|
||||
/usr/local/lib
|
||||
@@ -237,7 +239,9 @@ if (NOT GLOG_FOUND)
|
||||
glog/lib
|
||||
glog/Lib
|
||||
Glog/lib
|
||||
Glog/Lib)
|
||||
Glog/Lib
|
||||
google-glog/lib # CMake installs with project name prefix.
|
||||
google-glog/Lib)
|
||||
|
||||
# Search supplied hint directories first if supplied.
|
||||
find_path(GLOG_INCLUDE_DIR
|
||||
|
||||
Reference in New Issue
Block a user