- add satversion.h containing the current satsolver version
authorMichael Schroeder <mls@suse.de>
Wed, 15 Jul 2009 09:08:49 +0000 (11:08 +0200)
committerMichael Schroeder <mls@suse.de>
Wed, 15 Jul 2009 09:08:49 +0000 (11:08 +0200)
CMakeLists.txt
src/CMakeLists.txt
src/satversion.h.in [new file with mode: 0644]

index 81f915e58d532c293b65cac15b7fe929c190c4ac..d2392c8170b8de5913f3d48871d748967ecbc2e5 100644 (file)
@@ -48,6 +48,7 @@ SET( VERSION "${LIBSATSOLVER_MAJOR}.${LIBSATSOLVER_MINOR}.${LIBSATSOLVER_PATCH}"
 
 ADD_DEFINITIONS( -D_FILE_OFFSET_BITS=64 )
 ADD_DEFINITIONS( -DVERSION=\\\"${VERSION}\\\" )
+CONFIGURE_FILE( src/satversion.h.in src/satversion.h )
 
 SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "SAT Solver library")
 SET(CPACK_PACKAGE_VENDOR "Novell Inc.")
index 70e18c59e159e59de05a821e7c460d1530239b7f..791ae0f3b38825f89cf7ba331930d697d3a11319 100644 (file)
@@ -13,7 +13,7 @@ SET(libsatsolver_HEADERS
     poolid.h pooltypes.h queue.h solvable.h solver.h solverdebug.h
     repo.h repodata.h repopage.h repo_solv.h util.h
     strpool.h dirpool.h knownid.h transaction.h rules.h problems.h
-    chksum.h md5.h sha1.h sha2.h)
+    chksum.h md5.h sha1.h sha2.h satversion.h)
 
 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
 
diff --git a/src/satversion.h.in b/src/satversion.h.in
new file mode 100644 (file)
index 0000000..593fcf0
--- /dev/null
@@ -0,0 +1,22 @@
+/*
+ * Copyright (c) 2007, Novell Inc.
+ *
+ * This program is licensed under the BSD license, read LICENSE.BSD
+ * for further information
+ */
+
+/*
+ * satversion.h
+ * 
+ */
+
+#ifndef SATSOLVER_SATVERSION_H
+#define SATSOLVER_SATVERSION_H
+
+#define SATSOLVER_VERSION_STRING "@VERSION@"
+#define SATSOLVER_VERSION_MAJOR @LIBSATSOLVER_MAJOR@
+#define SATSOLVER_VERSION_MINOR @LIBSATSOLVER_MINOR@
+#define SATSOLVER_VERSION_PATCH @LIBSATSOLVER_PATCH@
+#define SATSOLVER_VERSION (SATSOLVER_VERSION_MAJOR * 10000 + SATSOLVER_VERSION_MINOR * 100 + SATSOLVER_VERSION_PATCH)
+
+#endif