UCL / pet-rd-tools

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

Findglog.cmake #32

Closed rijobro closed 2 years ago

rijobro commented 5 years ago

When building, I get the error:

/Users/rich/Documents/Code/petmr_rd_tools/Source/src/NMExtract.cpp:25:10: fatal error: 'glog/logging.h' file not found

I have set the glog_DIR variable, and with a bit of debugging in the Findglog.cmake, I can see that if (glog_FOUND) at line 182 is True. This means that the following code is executed:

# glog wraps the include directories into the exported glog::glog target.
set(GLOG_INCLUDE_DIR "")
set(GLOG_LIBRARY glog::glog)

At line 322, there is set(GLOG_LIBRARIES ${GLOG_LIBRARY}).

So, GLOG_INCLUDE_DIRS is blank and GLOG_LIBRARY/GLOG_LIBRARIES contain the useful stuff. However, neither of these variables are used outside of the Findglog.cmake.

rijobro commented 5 years ago

As temporary workaround, I put the following lines at the top of src/CMakeLists.txt:

include_directories("/Users/rich/Documents/Code/glog/Install/include")
set(glog "/Users/rich/Documents/Code/glog/Install/lib/libglog.a")
KrisThielemans commented 2 years ago

outdated as using glog::glog (but see #55 )