Make Windows version resource accept fewer than four version numbers

This commit is contained in:
Marius Greuel 2021-12-29 22:18:15 +01:00
parent 65e3fe358a
commit 5246cf1750
1 changed files with 28 additions and 4 deletions

View File

@ -27,10 +27,34 @@ BEGIN
100 "AVRDUDE"
END
#define VER_MAJOR @PROJECT_VERSION_MAJOR@
#define VER_MINOR @PROJECT_VERSION_MINOR@
#define VER_BUILD @PROJECT_VERSION_PATCH@
#define VER_REVISION @PROJECT_VERSION_TWEAK@
#cmakedefine PROJECT_VERSION_MAJOR @PROJECT_VERSION_MAJOR@
#cmakedefine PROJECT_VERSION_MINOR @PROJECT_VERSION_MINOR@
#cmakedefine PROJECT_VERSION_PATCH @PROJECT_VERSION_PATCH@
#cmakedefine PROJECT_VERSION_TWEAK @PROJECT_VERSION_TWEAK@
#ifdef PROJECT_VERSION_MAJOR
#define VER_MAJOR PROJECT_VERSION_MAJOR
#else
#define VER_MAJOR 0
#endif
#ifdef PROJECT_VERSION_MINOR
#define VER_MINOR PROJECT_VERSION_MINOR
#else
#define VER_MINOR 0
#endif
#ifdef PROJECT_VERSION_PATCH
#define VER_BUILD PROJECT_VERSION_PATCH
#else
#define VER_BUILD 0
#endif
#ifdef PROJECT_VERSION_TWEAK
#define VER_REVISION PROJECT_VERSION_TWEAK
#else
#define VER_REVISION 0
#endif
#define _STR(s) #s
#define _VER_STR(a, b, c, d) _STR(a) "." _STR(b) "." _STR(c) "." _STR(d)