[CMake] FIND_LIBRARY bug?

William A. Hoffman billlist at nycap.rr.com
Fri Oct 22 13:54:46 EDT 2004


CMake looks in the following places for FIND_LIBRARY:

CMAKE_LIBRARY_PATH  // environment variable 
PATH  // environment variable
path passed into FIND_LIBRARY command

So, it is finding it because /usr/local/bin must be in PATH.
Currently, the only way to get around this problem would be
to set the environment variable CMAKE_LIBRARY_PATH.

-Bill


At 01:44 PM 10/22/2004, Eric Bolz wrote:
>I'm do the following in cmake 2.0.3
>FIND_LIBRARY (MY_LIB    NAMES Xpm      PATHS /my/path)
>MESSAGE( "MY_LIB is ${MY_LIB}")
>
>MY_LIB gets set to /usr/local/bin.  Why?
>Sure, it exists there but I don't want that one. I did not tell cmake to look there.
>If cmake wants to look there then it should look there last.
>I even took /usr/local/bin out of my LD_LIBRARY_PATH and get the same result.
>I see no way to get FIND_LIBRARY to look in the specified PATHS first.
>
>Eric
>
>
>_______________________________________________
>CMake mailing list
>CMake at www.cmake.org
>http://www.cmake.org/mailman/listinfo/cmake



More information about the CMake mailing list