In my project, in the "configure" phase my CMake seems to find glog, but in the building phase I receive the error message: cannot find -llibglog
It makes no difference if I use
sudo apt-get install libgoogle-glog-dev
or generate glog from source. Recently I had to ugrade to Ubuntu 16.04 from 14.04, and have series of problems, from source redefinition problems to building problems like this.
Edited: It is a complex project, with many subprojects and packages, so it would not fair to post so many files. And, it worked before upgrading.
The relevant parts:
(FindGlog.cmake)
find_package_handle_standard_args(Glog DEFAULT_MSG GLOG_INCLUDE_DIR GLOG_LIBRARY)
if(GLOG_FOUND)
set(GLOG_INCLUDE_DIRS ${GLOG_INCLUDE_DIR})
set(GLOG_LIBRARIES ${GLOG_LIBRARY})
message(STATUS "Found glog (include: ${GLOG_INCLUDE_DIR}, library: ${GLOG_LIBRARY})")
mark_as_advanced(GLOG_ROOT_DIR GLOG_LIBRARY_RELEASE GLOG_LIBRARY_DEBUG
GLOG_LIBRARY GLOG_INCLUDE_DIR)
endif()
and CMakeLists.txt
target_link_libraries( simtest libmain libglog ${Pthread} )
and the message /usr/bin/ls: cannot find --libglog