version.h: Add version check macro

Make it easier to check for a Weston version.
dev
Pier Luigi Fiorini 11 years ago committed by Kristian Høgsberg
parent 639fd86493
commit d0a7282876
  1. 6
      src/version.h.in

@ -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

Loading…
Cancel
Save