[CMake] can't locate library with find_library

Oliver python152 at gmail.com
Wed Mar 22 09:52:17 EDT 2017


hi all,

I am running cmake 3 using EPEL install on RHEL 7. I also have installed
"gflags",



$rpm -ql gflags
/usr/bin/gflags_completions.sh
/usr/lib64/libgflags.so.2.1
/usr/lib64/libgflags_nothreads.so.2.1
/usr/share/doc/gflags-2.1.1
/usr/share/doc/gflags-2.1.1/AUTHORS.txt
/usr/share/doc/gflags-2.1.1/COPYING.txt
/usr/share/doc/gflags-2.1.1/ChangeLog.txt
/usr/share/doc/gflags-2.1.1/README.txt

but my check fails:

# glags
find_library(GFLAGS_LIB NAMES gflags PATHS /usr/lib64 /usr/lib
/usr/local/lib)

if (NOT GFLAGS_LIB)
    message(STATUS "gflags is not present, you can still control logging
through env settings")
    message(STATUS "    GLOG_logtostderr=1 ./your_application")
else()
    message(STATUS "gflags is present, you can controll logging through
command line:")
    message(STATUS "    ./your_application --logtostderr=1")
endif()


what did I do wrong? thx.





-- 
Oliver
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20170322/fcaae51d/attachment.html>


More information about the CMake mailing list