version.h: Add version check macro

Make it easier to check for a Weston version.
This commit is contained in:
Pier Luigi Fiorini 2013-09-23 07:26:03 +02:00 committed by Kristian Høgsberg
parent 639fd86493
commit d0a7282876

View File

@ -28,4 +28,10 @@
#define WESTON_VERSION_MICRO @WESTON_VERSION_MICRO@
#define WESTON_VERSION "@WESTON_VERSION@"
/* Can be used like #if WESTON_VERSION_AT_LEAST(1, 2, 0) */
#define WESTON_VERSION_AT_LEAST(major, minor, micro) \
(WESTON_VERSION_MAJOR == (major) && \
WESTON_VERSION_MINOR == (minor) && \
WESTON_VERSION_MICRO >= (micro))
#endif