[CMake] Finding dynamic libraries with major interface revision numbers (2)

Jean-Christophe Fillion-Robin jchris.fillionr at kitware.com
Wed Apr 13 14:44:33 EDT 2011


Hi Folks,

Is there a solution to find a library having a revision number ?

For example, on Ubuntu, after I installed 'libgfortran3', there is the
library /usr/lib/libgfortran.so.3

then the following command failed:  FIND_LIBRARY(GFortran_LIBRARY gfortran)

If I create the symlink  /usr/lib/libgfortran.so ->
/usr/lib/libgfortran.so.3  , it works.

The issue has already been discussed here:
http://www.cmake.org/pipermail/cmake/2011-January/042392.html

Out of curiosity, Is there any known workaround ... ?

Issuing the command: apt-file search "gfortran.so"   it reveals the
following:

[...]
gfortran-4.4: /usr/lib/gcc/x86_64-linux-gnu/4.4/libgfortran.so
[...]
libgfortran3: /usr/lib/libgfortran.so.3
libgfortran3: /usr/lib/libgfortran.so.3.0.0
[...]

Within cmake, is there a possibility to retrieve the lib directories
associated with the current compiler ?

I could then add these one to the PATHS arguments of the find library
command ...

Thanks
Jc


-- 
+1 919 869 8849
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110413/898e3e4f/attachment.htm>


More information about the CMake mailing list