find_library(THELIB NAMES thelibrary.${CMAKE_SHARED_LIBRARY_SUFFIX})
CMAKE_SHARED_LIBRARY_SUFFIX includes the "." though -- so take the "." out of the above line..... On Wed, Aug 4, 2010 at 3:53 PM, Alexander Neundorf <a.neundorf-w...@gmx.net>wrote: > On Wednesday 04 August 2010, Dennis Schridde wrote: > > On Wednesday 04 August 2010 10:03:55 Denis Scherbakov wrote: > > > >> 1) Is it > > > > possible to > > > > > retrieve the path where find_library found the library? > > > > E.g. so I can setup > > > > > ..._LIBRARY_DIR correctly. > > > > > > Yes, see > > > > GET_FILENAME_COMPONENT. > > > > > 2) Is it possible to disable the "lib" prefix > > > > that find_library always seems to prepend when searching? I have a > library > > > > that is called "thelibrary.so" instead of "libthelibrary.so". > > > > > Yes, > > > > specify name that you want to find. Like "NAMES libMyLib MyLib" > > Ah, so NAMES > > <name> specifies the literal name, while giving just <name> as a > parameter > > to find_library will prepend "lib" and append ".so"? > > No, Denis was only almost right. > > If one of the names has a suffix, this one is treated as a full filename > and > nothing will be prepended/appended. > So > find_library(THELIB NAMES thelibrary.so) > or > find_library(THELIB NAMES thelibrary.${CMAKE_SHARED_LIBRARY_SUFFIX}) > should do what you want. > > Alex > _______________________________________________ > 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 >
_______________________________________________ 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