[CMake] FIND_LIBRARY & mingw
Christian Ehrlicher
Ch.Ehrlicher at gmx.de
Tue Oct 16 13:20:05 EDT 2007
Alexander.Camek at elektrobit.com schrieb:
>
> Hi Christian,
>
>
>> it looks like FIND_LIBRARY is using a .lib if it can't find a
>> .a/.dll.a when using the mingw generator (see also
>> http://lists.kde.org/?l=kde-windows&m=119248363310566&w=2)
>
>> Is this a intented behaviour?
>
> Normally under windows you will need to link against a .lib.
> CMake default settings is to look for .lib files, so this is a intentend behaviour.
>
> So look in the file Windows.cmake in your Cmake installation path, there under modules\plattform.
> There it is set SET(CMAKE_FIND_LIBRARY_SUFFIXES ".lib")
>
That's not true - on windows with mingw you link against .a
And cmake also search for .a (and .dll.a) but *also* for .lib which is
imho a bug. When I've an import lib for msvc - foo.lib and one for mingw
- foo.a I get foo.a for mingw, but as soon as I remove foo.a I get
foo.lib which is wrong.
Christian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 250 bytes
Desc: OpenPGP digital signature
Url : http://public.kitware.com/pipermail/cmake/attachments/20071016/a4b69c59/signature.pgp
More information about the CMake
mailing list