Generate a config.h file for versioning
authorAlexandru Gagniuc <mr.nuke.me@gmail.com>
Fri, 12 Oct 2012 20:38:06 +0000 (15:38 -0500)
committerUwe Hermann <uwe@hermann-uwe.de>
Sat, 13 Oct 2012 13:02:44 +0000 (15:02 +0200)
commit075fb4995aaaf521502571d26da62a6923555eff
treef4f93f13b2f0a3d8300691622336928b9c4f89cf
parentb04e278da5b0a9aa7d5e62bbb40f32f0e51f662d
Generate a config.h file for versioning

Versioning was already handled in CMakeLists.txt, but it was handled
in a non-standard and unclear manner. We used
    set(VERSION
for starters. While this is valid CMake syntax, VERSION is also a
reserved word in cmake, depending on the context. We were
communicating the version information by a compile-time define, again,
not a recommended practice.

Change versioning to the more standard way of
    set(*VERSION_MAJOR
    set(*VERSION_MINOR
    set(*VERSION_MICRO
    set(*VERSION_STRING

Instead of defining the version at compile time, generate a config.h
file with the version information.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
CMakeLists.txt
config.h.in [new file with mode: 0644]
main.cpp