[CMake] Is it possible to set shared lib version info globally?

Adolfo Rodríguez Tsouroukdissian adolfo.rodriguez at pal-robotics.com
Tue Mar 2 07:07:44 EST 2010


On Tue, Mar 2, 2010 at 12:50 PM, Mario Ceresa <mrceresa at gmail.com> wrote:

> Hello all,
> thanks for the wonderful work with cmake: I've started using it in all
> my projects!
>
> I'm trying to package VXL for Fedora and package guidelines require
> all libs to be properly versioned.
>
> My problem is that the actual cmake build of the project produces only
> unversioned shared lib (they are all lib*.so not lib*.so.xx).
>
> Is there a way to add version information globally, for all libraries?
> Or do I have to manually search where each lib is generated and add
> set_target_properties() to each?
>
> I'm sorry if I made a silly question, but I googled for a while and
> found nothing
>

You should do:

set_target_properties(foo PROPERTIES SOVERSION XX.xx)

The doc for this particular target property can be found here:

http://cmake.org/cmake/help/cmake-2-8-docs.html#prop_tgt:SOVERSION

Cheers,

Adolfo


>
> Thanks and regards,
>
> Mario
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>



-- 
Adolfo Rodríguez Tsouroukdissian, Ph. D.

Robotics engineer
PAL ROBOTICS S.L
http://www.pal-robotics.com
Tel. +34.93.414.53.47
Fax.+34.93.209.11.09
AVISO DE CONFIDENCIALIDAD: Este mensaje y sus documentos adjuntos, pueden
contener información privilegiada y/o confidencial que está dirigida
exclusivamente a su destinatario. Si usted recibe este mensaje y no es el
destinatario indicado, o el empleado encargado de su entrega a dicha
persona, por favor, notifíquelo inmediatamente y remita el mensaje original
a la dirección de correo electrónico indicada. Cualquier copia, uso o
distribución no autorizados de esta comunicación queda estrictamente
prohibida.

CONFIDENTIALITY NOTICE: This e-mail and the accompanying document(s) may
contain confidential information which is privileged and intended only for
the individual or entity to whom they are addressed.  If you are not the
intended recipient, you are hereby notified that any disclosure, copying,
distribution or use of this e-mail and/or accompanying document(s) is
strictly prohibited.  If you have received this e-mail in error, please
immediately notify the sender at the above e-mail address.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100302/d9a435a4/attachment.htm>


More information about the CMake mailing list