notcurses/tools/version.h.in
nick black 7b3c391643 Add more version-related defines (#1131)
Add NOTCURSES_VERNUM_* as integer preprocessor definitions of
the four version components. Add NOTCURSES_VERNUM_ORDERED as
a 32-bit totally comparable integer. Preserve the definitions
of NOTCURSES_VERSION_*, defining them in terms of VERNUMs.
Don't use TWEAK in version, since it usually isn't defined.
2020-11-24 04:19:47 -05:00

21 lines
739 B
C

// Populated by CMake, and installed to the host system
#ifndef NOTCURSES_VERSION_HEADER
#define NOTCURSES_VERSION_HEADER
#define NOTCURSES_VERNUM_MAJOR @notcurses_VERSION_MAJOR@
#define NOTCURSES_VERNUM_MINOR @notcurses_VERSION_MINOR@
#define NOTCURSES_VERNUM_PATCH @notcurses_VERSION_PATCH@
#define NOTCURSES_VERNUM_TWEAK @notcurses_VERSION_TWEAK@
#define NOTCURSES_VERNUM_ORDERED \
((NOTCURSES_VERNUM_MAJOR << 16u) + \
(NOTCURSES_VERNUM_MINOR << 8u) + \
(NOTCURSES_VERNUM_PATCH))
#define NOTCURSES_VERSION_MAJOR "@notcurses_VERSION_MAJOR@"
#define NOTCURSES_VERSION_MINOR "@notcurses_VERSION_MINOR@"
#define NOTCURSES_VERSION_PATCH "@notcurses_VERSION_PATCH@"
#define NOTCURSES_VERSION_TWEAK "@notcurses_VERSION_TWEAK@"
#endif