On 4/26/07, Bill Hoffman <[EMAIL PROTECTED]> wrote:
Mathieu Malaterre wrote:
> I have a test case for using cmake to link to a non 'lib' prefix library:
>
> http://gdcm.svn.sourceforge.net/viewvc/gdcm/Sandbox/CMakeBug/2/
>
> Replicated with cmake 2.4.5 and CMake CVS
>
> -----
> ADD_LIBRARY(foo SHARED foo.c)
> SET_TARGET_PROPERTIES(foo PROPERTIES PREFIX "")
>
> ADD_EXECUTABLE(testfoo testfoo.c)
> TARGET_LINK_LIBRARIES(testfoo foo)
> -----
>
> How to retrieve:
>
> svn co https://gdcm.svn.sourceforge.net/svnroot/gdcm/Sandbox/CMakeBug/2
>
> should it be entered in the bug tracker ?
 I don't think you can link to a library without a lib prefix.   Cmake
always uses the -L -l options to link, and they require a prefix on some
systems to work.

Hum... I'll have to be more convincing to make my coworkers move away
from Makefile, if there are things they cannot achieve anymore (gcc
seems to be tolerant so that you can pass a full path to the shared
lib, even without a lib prefix).

But I see your point, a lib should be prefixed with lib anyway.

Thanks,
-Mathieu
_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to