[CMake] Question about FIND_LIBRARY

Alexander Neundorf a.neundorf-work at gmx.net
Mon Apr 14 16:51:00 EDT 2008


On Friday 11 April 2008, Ilya Shvetsov wrote:
> 		Hi, all.
> I use cmake 2.4.8 on Windows XP with MSVC 2005 and Cygwin installed.
>
> I have two versions of lib "A".
>
> First one for MSVC - A.lib
> Second one for gcc - libA.a
>
> To find lib "A" I type this command
> FIND_LIB(LIB_A A PATHS ${LIB_PATHS})
>
> For NMake Generator all work fine. For "Unix Makefiles" Generator cmake
> can't find library.
> I tried to find problem and found this for "Unix Makefiles" Generator
>
> CMAKE_FIND_LIBRARY_PREFIXES =
> CMAKE_FIND_LIBRARY_SUFFIXES = .lib
>
>
> What I do wrong. May be I must give some hint to cmake.
>
> I use this command lines to generate makefiles
>
> "cmake -G"NMake Makefiles" .." - for MSVC
> "cmake -G"Unix Makefiels" .."  - for Cygwin gcc

For cygwin makefiles you must use the cygwin version of cmake, then it should 
work.

Alex


More information about the CMake mailing list