Fix bug in gflags' <= 2.1.2 exported CMake configuration.

- gflags <= 2.1.2 has a bug in its exported gflags-config.cmake:
  https://github.com/gflags/gflags/issues/110 whereby it sets
  gflags_LIBRARIES to a non-existent 'gflags' target.
- This causes linker errors if gflags is installed in a non-standard
  location (as otherwise CMake resolves gflags to -lgflags which
  links if gflags is installed somewhere on the current path).
- We now check for this case, and search for the correct gflags imported
  target and update gflags_LIBRARIES to reference it if found, otherwise
  proceed on to the original manual search to try to find gflags.

Change-Id: Iceccc3ee53c7c2010e41cc45255f966e7b13d526
1 file changed
tree: 2cd6eef151ec13cb311c08cabd55251c385348fa
  1. cmake/
  2. config/
  3. data/
  4. docs/
  5. examples/
  6. include/
  7. internal/
  8. jni/
  9. scripts/
  10. .gitignore
  11. CMakeLists.txt
  12. LICENSE
  13. README.md
README.md

Ceres Solver - A non-linear least squares minimizer

Please see ceres-solver.org for more information.

WARNING - Do not make GitHub pull requests!

Ceres development happens on Gerrit, including both repository hosting and code reviews. The GitHub Repository is a continuously updated mirror which is primarily meant for issue tracking. Please see our Contributing to Ceres Guide for more details.

The upstream Gerrit repository is

https://ceres-solver.googlesource.com/ceres-solver