Subject: [PATCH] Add LWS_LIBRARY_VERSION_NUMBER to lws_config.h.
authorRoger A. Light <roger@atchoo.org>
Mon, 14 Dec 2015 17:25:29 +0000 (17:25 +0000)
committerAndy Green <andy.green@linaro.org>
Tue, 15 Dec 2015 11:49:55 +0000 (19:49 +0800)
commite59908e7fc0000b1e7ebb4f546bc9490fab0612f
treed1118acc1b8adc451fed03bcfd5d5d5af9e8ef4c
parentea592fa869666ef01074ac2d95a0165fd42965f2
Subject: [PATCH] Add LWS_LIBRARY_VERSION_NUMBER to lws_config.h.

This changeset adds a few preprocessor macros to lws_config.h to allow
a user of libwebsockets to determine at compile time which version of
lws they are compiling against.

This exposes the already existing LWS_LIBRARY_VERSION_MAJOR and _MINOR
values, and adds LWS_LIBRARY_VERSION_PATCH. This suggests that future
minor bugfix release versions of lws would be e.g. 1.6.0 -> 1.6.1 rather
than the style used previously: 1.2 -> 1.21.

The way this is currently set up means new minor revisions (with
_PATCH==0) always end with .0 but I could change this if preferred.

The most important addition is LWS_LIBRARY_VERSION_NUMBER, which
produces a number of the form 1005001 for version 1.5.1 - i.e. each part
major, minor, patch can extend from 0-999. This macro allows a very easy
compile time comparison of version numbers.
CMakeLists.txt
lws_config.h.in