[Cmake] liblib under linux (patch)
Andy Cedilnik
andy . cedilnik at kitware . com
10 Jul 2003 10:14:25 -0400
Hi Petr,
There is a bug in CMake which prevents libraries on Windows to start
with lib. You should really say:
ADD_LIBRARY(web ...)
and then
TARGET_LINK_LIBRARIES(foo web)
Andy
On Wed, 2003-07-09 at 09:25, Petr Ferschmann wrote:
> in all our projects we use our library named libweb. Under linux it is
> stored in libweb.a and under windows it is store in libweb.lib.
>
> We are building it using CMake.
> If call ADD_LIBRARY() with libweb under linux it is named
> liblibweb.a.
>
> And I don't want it. So I made change that solve it. If library is
> already starts with lib it doesn't add it again. It is changed only
> under Makefile generator.
>
> It is stored in patch named kerio.diff.
>
> But there is still problem. If I use
> TARGET_LINK_LIBRARIES(someProgram libweb)
> it tries to link with liblibweb. I solved it too (patch named
> kerio2.diff). But this solution is not general.
> If you apply it then you can't link with liblibweb :-) (if somebody
> really use it).
>
> But I think this doesn't happen too often. So I think it could be
> applied too.
>
> Both patches are allowed to be included in CMake distribution - also for
> commercial - ie you can sell it (thanks to Kerio Technologies - my
> employee).