[Cmake] Making the cmake FindXXX.cmake files more consistent

Amitha Perera perera at cs.rpi.edu
Mon Aug 19 12:01:47 EDT 2002


On Mon, Aug 19, 2002 at 09:32:49AM -0400, Miller, James V (Research) wrote:
> Does this impact "delivering" software?  If I ship my executable
> to a customer, will the executable only look for libjpeg.so in 
> /usr/local/lib? Or does the rpath thingy fix this? Or do things
> fall back to LD_LIBRARY_PATHs?

Embedding the path in the library name is no different (from CMake's
point of view) than a separate LINK_DIRECTORIES and
LINK_LIBRARIES. But that is not really the question you asked... :-)

Under most (all?) Unixen, the search order for shared libraries is: 1)
the rpath information embedded in the executable; 2) the
LD_LIBRARY_PATH environment variable; and 3) the system search paths
(which can be modified by ldconfig). So yes, if you do shared linking,
all can be made to work with appropriate LD_LIBRARY_PATH settings.

Amitha.



More information about the CMake mailing list