[CMake] return value of find_library

Yifei Li yifli at mtu.edu
Fri Sep 23 15:20:37 EDT 2011



On Sep 22, 2011, at 2:39 PM, David Cole wrote:

> It should always be a full path for a valid found library. Under what
> circumstances are you getting exactly "mylib" … ?
Here is a real example:

find_package(OpenMesh)
message("${OPENMESH_LIBRARY}")

find_package(ARPACK)
message("${ARPACK_LIBRARY}")

find_package(SUPERLU)
message("${SUPERLU_LIBRARY}")


only the last one, ${SUPERLU_LIBRARY}, is the full path.

P.S.,  I have cmak 2.8-5 installed on my Macbook Pro running Lion


> 
> On Thu, Sep 22, 2011 at 11:26 AM, Yifei Li <yifli at mtu.edu> wrote:
>> Hi all,
>> 
>> Say I have find_library(MYLIB mylib  PATHS …) ,   I don't understand why MYLIB sometimes is a full path to mylib and sometimes only contains 'mylib'.
>> 
>> Thanks
>> 
>> Yifei
>> 
>> --
>> 
>> Powered by www.kitware.com
>> 
>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>> 
>> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
>> 
>> Follow this link to subscribe/unsubscribe:
>> http://www.cmake.org/mailman/listinfo/cmake
>> 



More information about the CMake mailing list