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

Brad King brad.king at kitware.com
Wed Apr 13 15:26:27 EDT 2011


On 04/13/2011 02:44 PM, Jean-Christophe Fillion-Robin wrote:
> Is there a solution to find a library having a revision number ?

You can specify the actual library file name "libgfortran.so.3".

However, you shouldn't need to find implicit compiler runtime libraries.
Are you trying to mix C++ and Fortran?

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

CMake 2.8.x already does this.  Look in the CMakeFiles/CMake*Compiler.cmake
files in your build tree.  However, these variables are generally meant
for internal use by the link line computation code.

If a binary contains sources from both C++ and Fortran CMake already knows
how to link it with C++ and pass the Fortran runtime libraries on the link
line.

-Brad


More information about the CMake mailing list