[CMake] Getting library dependency files without full paths

Michael Schutte michi at debian.org
Mon Aug 15 13:50:19 EDT 2011


Hi everyone,

I am currently dealing with some Debian library packages that ship
*LibraryDepends.cmake files with absolute paths to their required shared
objects.  Due to the ongoing multiarch transition, many of these .so
files are moved down the directory hierarchy, so that libraries for
multiple architectures can be installed in parallel.  Of course this
frequently breaks the build of the offending packages' reverse
dependencies.

It seems that substituting "/usr/lib/($MULTIARCH_DIR/)?lib$NAME.so;"
with "$NAME;" in these files doesn't cause any problems; most
importantly, CMake still manages to find the libraries for transitive
linking.  Are there any non-obvious issues if this hack is implemented?
Is there a way to tell CMake to not record full paths for .so's in
default locations?

Cheers and thanks in advance,
-- 
Michael Schutte                   | michi@{uiae.at,debian.org}
Innsbruck, Austria                | happily accepting encrypted mail
OpenPGP: 0x16fb 517b a866 c3f6 8f11 1485 f3e4 122f 1D8C 261A


More information about the CMake mailing list