[CMake] Should CMake use /etc/ld.so.conf.d for find_library's CMAKE_SYSTEM_LIBRARY_PATH?
Alexander Neundorf
a.neundorf-work at gmx.net
Thu Jan 20 12:25:35 EST 2011
On Thursday 20 January 2011, James Bigler wrote:
> I'm noticing that on some systems they package the NVIDIA driver into
> different directories than the driver is typically installed. In order to
> make stuff link properly at run time these non-standard locations are added
> to /etc/ld.so.conf.d. I'm wondering if there is a reason not to use this
> information to add paths to CMAKE_SYSTEM_LIBRARY_PATH? It would certainly
> help in finding libraries that are installed in diverse places.
Sounds like a useful idea IMO.
It could be done in UnixPaths.cmake, if /etc/ld.so.conf exists, parse it, get
the directories from it, check for duplicates, and add them to the search
paths.
Do you think it should be only added to the library search path or should
the "/lib" at the end of each directory be removed and the remainder be added
to the general search prefixes ?
Otherwise it might now find the libs, but maybe not the corresponding headers.
Alex
More information about the CMake
mailing list