grim/guifications3

620a7ced9855
Parents c257c44bdf6a
Children 4309f4d791be
created gf_version.h to handle our version macros
--- a/gflib/CMakeLists.txt Tue May 17 20:58:39 2011 -0500
+++ b/gflib/CMakeLists.txt Tue May 17 21:41:25 2011 -0500
@@ -9,6 +9,8 @@
pkg_check_modules(GMODULE REQUIRED gmodule-2.0>=2.16.0)
include_directories(
+ ${CMAKE_SOURCE_DIR}
+ ${CMAKE_BINARY_DIR}
${GDS_INCLUDE_DIRS}
${GMODULE_INCLUDE_DIRS}
)
--- a/gflib/gflib/CMakeLists.txt Tue May 17 20:58:39 2011 -0500
+++ b/gflib/gflib/CMakeLists.txt Tue May 17 21:41:25 2011 -0500
@@ -44,6 +44,7 @@
set(GFLIB_BUILT_HEADERS
gf_enum.h
gf_marshallers.h
+ gf_version.h
)
set(GFLIB_SOURCES
@@ -95,6 +96,11 @@
configure_file(gf_lib.h.in gf_lib.h @ONLY)
###############################################################################
+# gf_version.h generation
+###############################################################################
+configure_file(gf_version.h.in gf_version.h @ONLY)
+
+###############################################################################
# gflib-query-plugins executable
###############################################################################
add_executable(gflib-query-plugins gf_query_plugins.c gf_lib.h)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gflib/gflib/gf_version.h.in Tue May 17 21:41:25 2011 -0500
@@ -0,0 +1,34 @@
+/*
+ * Guifications - The end-all, be-all notification framework
+ * Copyright (C) 2003-2011 Gary Kramlich <grim@reaperworld.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#ifndef GF_VERSION_H
+#define GF_VERSION_H
+
+#define GF_MAJOR_VERSION (@GFLIB_MAJOR_VERSION@)
+#define GF_MINOR_VERSION (@GFLIB_MINOR_VERSION@)
+#define GF_MICRO_VERSION (@GFLIB_MICRO_VERSION@)
+#define GF_EXTRA_VERSION "@GFLIB_EXTRA_VERSION@"
+
+#define GF_VERSION_CHECK(x, y, z) \
+ ((x) == GF_MAJOR_VERSION && \
+ ((y) < GF_MINOR_VERSION || \
+ ((y) == GF_MINOR_VERSION && (z) <= GF_MICRO_VERSION)))
+
+#define GF_VERSION "@GFLIB_VERSION@"
+
+#endif /* GF_VERSION_H */
+