fwupd/libfwupd/fwupd-version.h.in
Mario Limonciello 1e17457b16 Allow building the documentation with gi-docgen and gtk-doc
Until gi-docgen is declared stable support either of them.
This effectively means that hand builds and CI builds will use
gi-docgen, but distro builds use gtk-doc-tools.
2021-06-09 22:21:53 +01:00

61 lines
1.4 KiB
C

/*
* Copyright (C) 2015 Richard Hughes <richard@hughsie.com>
*
* SPDX-License-Identifier: LGPL-2.1+
*/
#pragma once
#include <glib.h>
#if !defined (__FWUPD_H_INSIDE__) && !defined (FWUPD_COMPILATION)
#error "Only <fwupd.h> can be included directly."
#endif
/**
* FWUPD_MAJOR_VERSION:
*
* The compile-time major version
*/
#ifndef FWUPD_MAJOR_VERSION
#define FWUPD_MAJOR_VERSION (@FWUPD_MAJOR_VERSION@)
#endif
/**
* FWUPD_MINOR_VERSION:
*
* The compile-time minor version
*/
#ifndef FWUPD_MINOR_VERSION
#define FWUPD_MINOR_VERSION (@FWUPD_MINOR_VERSION@)
#endif
/**
* FWUPD_MICRO_VERSION:
*
* The compile-time micro version
*/
#ifndef FWUPD_MICRO_VERSION
#define FWUPD_MICRO_VERSION (@FWUPD_MICRO_VERSION@)
#endif
/**
* FWUPD_CHECK_VERSION:
* @major: Major version number
* @minor: Minor version number
* @micro: Micro version number
*
* Check whether a fwupd version equal to or greater than
* major.minor.micro.
*
* These compile time macros allow the user to enable parts of client code
* depending on the version of libfwupd installed.
*/
#define FWUPD_CHECK_VERSION(major,minor,micro) \
(FWUPD_MAJOR_VERSION > (major) || \
(FWUPD_MAJOR_VERSION == (major) && FWUPD_MINOR_VERSION > (minor)) || \
(FWUPD_MAJOR_VERSION == (major) && FWUPD_MINOR_VERSION == (minor) && \
FWUPD_MICRO_VERSION >= (micro)))
const gchar *fwupd_version_string (void);