[CMake] FIND_LIBRARY - always true - very strange...

Christian Kienle Christian-kienle at losg.org
Wed May 11 13:57:07 EDT 2005


Hi all,

I have a strange problem - see my CMakeLists.txt file:

       1 PROJECT(LIBLOADER)
       2
       3 # let's look for libdl (libloader needs this for dlopen()  
and so on.
       4 FIND_LIBRARY(PATH_OF_LIB_DL NAMES dadfdfasdf PATHS /usr/lib)
       5 MESSAGE("-- checking for aNiceLib... ${PATH_OF_LIB_DL}")
       6 IF (PATH_OF_LIB_DL)
       7         MESSAGE("FOUND")
       8 ELSE (PATH_OF_LIB_DL)
       9         MESSAGE("-- error: libdl not found.")
      10 ENDIF (PATH_OF_LIB_DL)

If I execute cmake . in my source directory I get this:

cmks-Computer:~/Desktop/cmksql/libloader cmk$ cmake .
-- Check for working C compiler: gcc -- works
-- Check for working CXX compiler: c++ -- works
-- checking for aNiceLib... /usr/lib/libdl.dylib
FOUND
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/cmk/Desktop/cmksql/libloader

But why did cmake found "dadfdfasdf"? It's not there... :/

Greets

Christian


More information about the CMake mailing list