Thorsten Wagner wrote: > Hello, > > i have a library "libpnt.so" under /usr/local/lib/pnt. > I've added a pnt.conf with this path under /etc/ld.so.conf.d/ and > execute ldconfig > > ldconfig -v | grep libpnt.so finds the library: > > "libpnt.so.0 -> libpnt.so.0.8.1" > > In the CMakeList.txt i try to link against the target: > "TARGET_LINK_LIBRARIES(profil pnt ...)" > > But the linker returns: "cannot find -lpnt". > > When the library is saved under /usr/local/lib, everything works fine... > > Any suggestions?
TARGET_LINK_LIBRARIES(profil /usr/local/lib/pnt/libpnt.so) What's in ld.so.conf is for the dynamic linker on program execution, it has nothing to do with the paths used by the linker that creates the program. Just use the absolute paths to the libraries you want to link. Or use FIND_LIBRARY() to get this path, which will return an absolute path and looks in some default places for you. Eike -- 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