[CMake] prefer static to dynamic library on linux

Leopold Palomo Avellaneda leo at alaxarxa.net
Thu May 1 06:21:33 EDT 2008


A Dimecres 30 Abril 2008, John Doe va escriure:
> Hello,
>
> I just started using ubuntu linux and it is a pleasure to see that
> they provide both static and shared versions of libtcl8.4.  Is there a
> way to tell cmake to prefer the static version of this library, even
> if they are in the same directory, /usr/lib.

On way to do it is to add "-static" to your CMAKE_EXE_LINKER_FLAGS. Then, the 
linker will link use the static. Be carefull because, I think that it will 
like _all_ in static.

Regards,

Leo

-- 
--
Linux User 152692
PGP: 0xF944807E
Catalonia
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://www.cmake.org/pipermail/cmake/attachments/20080501/75caefe8/attachment.pgp>


More information about the CMake mailing list