[CMake] embed version numbers in libraries (.so, a) and executables

Hendrik Sattler post at hendrik-sattler.de
Thu Mar 20 07:30:39 EDT 2008


Vandenbroucke Sander schrieb:
> This is verry unix like solution. I used a Python script with the PySvn plug-in. For me it works on both XP and Linux.
>
> First I tried a CMake macro as in:
> ADD_CUSTOM_TARGET(OutputSvnVersion ALL
>          ${MY_SVN_MACRO})
>
> Which obviously doesn't work. It should be a nice feature to have, in my opinion. That way there is no/less need for using external scripts.
>
> Anyway: Could CMake provide some standard macro's to generate such files on build time? It seems to me that a lot of people would benefit from it. I mean this isn't the first post on the subject, is it?
>   

Can't you use the method provided by SVN using $Id$?
Writing a proper resource file for Windows DLLs that include a version.h 
is not that difficult.

HS



More information about the CMake mailing list