[Cmake] Making the cmake FindXXX.cmake files more consistent
Miller, James V (Research)
millerjv at crd.ge.com
Mon Aug 19 09:32:49 EDT 2002
> Consider vil (vxl's image library). vil depends on libraries such as
> jpeg, tiff, and png. We have somewhere
>
> TARGET_LINK_LIBRARIES( vil ${JPEG_LIBRARIES} ${PNG_LIBRARIES} )
>
> In the executable, we have
>
> TARGET_LINK_LIBRARIES( myexec vil )
>
> All works well, without the need for LINK_DIRECTORIES, because
> JPEG_LIBRARIES is defined as /usr/local/lib/libjpeg.so. That is, the
> full path is already embedded in the dependency. If it weren't, the
> client would need to do a
>
> LINK_DIRECTORIES( ${JPEG_LIBRARY_DIRS} )
>
> and much of the benefit of the dependency analysis is lost.
>
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?
Jim
More information about the CMake
mailing list