summaryrefslogtreecommitdiffstats
path: root/src/include/glibmm_version.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:24:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:24:48 +0000
commitcca66b9ec4e494c1d919bff0f71a820d8afab1fa (patch)
tree146f39ded1c938019e1ed42d30923c2ac9e86789 /src/include/glibmm_version.h
parentInitial commit. (diff)
downloadinkscape-upstream.tar.xz
inkscape-upstream.zip
Adding upstream version 1.2.2.upstream/1.2.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--src/include/glibmm_version.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/src/include/glibmm_version.h b/src/include/glibmm_version.h
new file mode 100644
index 0000000..39bf2c6
--- /dev/null
+++ b/src/include/glibmm_version.h
@@ -0,0 +1,45 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/** @file
+ * macro for checking glibmm version
+ *//*
+ * Authors:
+ * Patrick Storz <eduard.braun2@gmx.de>
+ *
+ * Copyright (C) 2020 Authors
+ * Released under GNU GPL v2+, read the file 'COPYING' for more information.
+ */
+
+#ifndef SEEN_GLIBMM_VERSION
+#define SEEN_GLIBMM_VERSION
+
+#include <glibmm.h>
+
+#ifndef GLIBMM_CHECK_VERSION
+
+#if !defined(GLIBMM_MAJOR_VERSION) || !defined(GLIBMM_MINOR_VERSION) || !defined(GLIBMM_MICRO_VERSION)
+ #error "Missing defines for glibmm version (GLIBMM_MAJOR_VERSION / GLIBMM_MINOR_VERSION / GLIBMM_MICRO_VERSION)"
+#endif
+
+/**
+ * Check glibmm version
+ *
+ * This is adapted from the upstream gtk macro for use with glibmm
+ *
+ * @major: major version (e.g. 1 for version 1.2.5)
+ * @minor: minor version (e.g. 2 for version 1.2.5)
+ * @micro: micro version (e.g. 5 for version 1.2.5)
+ *
+ * Returns %TRUE if the version of the glibmm header files
+ * is the same as or newer than the passed-in version.
+ *
+ * Returns: %TRUE if glibmm headers are new enough
+ */
+#define GLIBMM_CHECK_VERSION(major,minor,micro) \
+ (GLIBMM_MAJOR_VERSION > (major) || \
+ (GLIBMM_MAJOR_VERSION == (major) && GLIBMM_MINOR_VERSION > (minor)) || \
+ (GLIBMM_MAJOR_VERSION == (major) && GLIBMM_MINOR_VERSION == (minor) && \
+ GLIBMM_MICRO_VERSION >= (micro)))
+
+#endif // #ifndef GLIBMM_CHECK_VERSION
+
+#endif // SEEN_GLIBMM_VERSION