UCL / pet-rd-tools

Command line tools for PET-MR (pre-)processing
Apache License 2.0
14 stars 4 forks source link

Can't find Glog if Glog wasn't built using CMake #7

Closed ashgillman closed 6 years ago

ashgillman commented 6 years ago

I was having trouble building:

CMake Error at CMake/nmtools-deps.cmake:19 (find_package):
  By not providing "Findglog.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "glog", but
  CMake did not find one.

  Could not find a package configuration file provided by "glog" with any of
  the following names:

    glogConfig.cmake
    glog-config.cmake

  Add the installation prefix of "glog" to CMAKE_PREFIX_PATH or set
  "glog_DIR" to a directory containing one of the above files.  If "glog"
  provides a separate development package or SDK, be sure it has been
  installed.
Call Stack (most recent call first):
  CMakeLists.txt:36 (include)

I believe this was because my system's Glog wasn't built using CMake. I was able to fix by providing my own Findglog.cmake, included from Ceres-Solver. The project's license allows inclusion given that the license is copied with the code.

You may like to require that users install Glog with CMake instead, or may not like to include code from another project, but I figured I would make a pull request anyway.

bathomas commented 6 years ago

Thanks for this. License appears to be BSD, so is fine.