[Cmake] Searching for libraries

David Svoboda xsvobod2 at informatics . muni . cz
Thu, 27 Nov 2003 14:56:30 +0100


On Thu, 27 Nov 2003, Albert Strasheim wrote:

> Hello,
>
> On Thu, 27 Nov 2003, David Svoboda wrote:
>
> > I'd like to search for the libraries as much effective as possible. Well,
> > with the following code I do not find it sufficient:
> >
> >    FIND_LIBRARY(OMNITHREAD_LIB omnithread ${LIB_DIRS}
> >       DOC "Path to omnithread library")
>
> What is the value of ${LIB_DIRS}? Try specifying some explicit paths
> instead, for example:
>
> FIND_LIBRARY(OMNITHREAD_LIB omnithread /usr/lib /opt/lib)

The variable LIB_DIRS contains /usr/lib /usr/local/lib

Unfortunately, I'm not able to predict the name to required directory. For
example, if I use different compilers and therefore different compiled
versions of libraries a had to choose many paths - in the prevoius mail I
tried to avoid choosing many identical paths!

>
> and see if that works for you.
>
> You could also try looking at some of the other "library finding" modules
> that are part of CMake, such as FindZLIB.cmake.

Yes, I know. I looked through it but I did not find the solution I needed.


David