[CMake] Finding dynamic libraries with major interface revision numbers
Jack Poulson
jack.poulson at gmail.com
Sun Jan 30 14:43:13 EST 2011
Hello,
I am having a hard time figuring out what the appropriate method is for
getting cmake to find a library of the form /usr/lib/libgfortran.so.2.
Unfortunately, it is fairly common for /usr/lib/libgfortran.so not to exist.
I am fairly certain that forming /usr/lib/libgfortran.so as a symbolic link
would solve the problem, but I obviously cannot assume that the user has
administrator privileges.
The find_library documentation for CMake 2.8 does not seem to specify how
NAMES can be used to specify the library extension. The following does not
find /usr/lib/libgfortran.so.2 when GFORTRAN_LIB_DIR_HINT is set to
/usr/lib:
find_library(GFORTRAN_LIB
NAMES gfortran libgfortran.a gfortran.so libgfortran.so
gfortran.so.1 libgfortran.so.1
gfortran.so.2 libgfortran.so.2
gfortran.so.3 libgfortran.so.3
HINTS ${GFORTRAN_LIB_DIR_HINT})
Any ideas?
Thanks,
Jack
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110130/58e53a24/attachment.htm>
More information about the CMake
mailing list