diff options
author | Neil Roberts <neil@linux.intel.com> | 2012-04-11 16:59:05 +0100 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2012-04-12 17:54:44 -0400 |
commit | 18a770c80d59ef672e54688761bc8d0d9e660e12 (patch) | |
tree | 15700164694250a777c527c71a732431b832ed65 /src/wayland-version.h.in | |
parent | 8e5866a54d068bd7d4228cdd257256962744ded0 (diff) |
Add a public header for the version number
This adds a public header so that applications can get the Wayland
version number at compile time. This can be used to make applications
that support compiling against multiple versions of Wayland.
There is a separate installed header called cogl-version.h which gets
included by both wayland-client.h and wayland-server.h
The canonical place for the version number is the configure.ac script
which splits it into three separate m4 defines for the major, minor
and micro version. These are copied into the generated
wayland-version.h header using AC_SUBST. There is also a string form
of the complete version number.
The version number is now also automatically copied into the two .pc
files.
Because the major, minor and micro parts are required it is no longer
possible to leave the version number as 'master' when building from
git. Most projects seem to immediately bump the git repo to a fake
version number (usually odd) after making a release so that there is
always a relative number that can be used for comparison. This patch
sets the git version to 0.99.0 under the assumption that the next
release will be 1.0.0.
Diffstat (limited to 'src/wayland-version.h.in')
-rw-r--r-- | src/wayland-version.h.in | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/wayland-version.h.in b/src/wayland-version.h.in new file mode 100644 index 0000000..9a746ca --- /dev/null +++ b/src/wayland-version.h.in @@ -0,0 +1,31 @@ +/* + * Copyright © 2012 Intel Corporation + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that copyright + * notice and this permission notice appear in supporting documentation, and + * that the name of the copyright holders not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. The copyright holders make no representations + * about the suitability of this software for any purpose. It is provided "as + * is" without express or implied warranty. + * + * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THIS SOFTWARE. + */ + +#ifndef WAYLAND_VERSION_H +#define WAYLAND_VERSION_H + +#define WAYLAND_VERSION_MAJOR @WAYLAND_VERSION_MAJOR@ +#define WAYLAND_VERSION_MINOR @WAYLAND_VERSION_MINOR@ +#define WAYLAND_VERSION_MICRO @WAYLAND_VERSION_MICRO@ +#define WAYLAND_VERSION "@WAYLAND_VERSION@" + +#endif |