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

Hendrik Sattler post at hendrik-sattler.de
Thu Mar 20 08:31:09 EDT 2008


Vandenbroucke Sander schrieb:
>> From: Hendrik Sattler [mailto:post at hendrik-sattler.de]
>> Sent: donderdag 20 maart 2008 12:31
>> To: Vandenbroucke Sander
>> Cc: cmake at cmake.org
>> Subject: Re: [CMake] embed version numbers in libraries (.so, a) and
>> executables
>>
>> 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.
>>     
> By using properties on a file? Doesn't that only work when this file is
> changed & committed?
>   
A version.h file can be created on-the-fly with whatever method. By the 
way, using SVN revision is totally bogus as one number doesn't tell you 
anything about the used source. Remember, you can checkout different 
files with different revisions.
Additionally, using SVN revision will come back to you at one time, e.g. 
when you switch to a different VCS (or even combine different  ones).

HS



More information about the CMake mailing list