- add runtime definitions so that apps can print the version of the shared lib
authorMichael Schroeder <mls@suse.de>
Wed, 15 Jul 2009 14:11:10 +0000 (16:11 +0200)
committerMichael Schroeder <mls@suse.de>
Wed, 15 Jul 2009 14:11:10 +0000 (16:11 +0200)
src/CMakeLists.txt
src/satversion.c [new file with mode: 0644]

index 791ae0f..2a5ff51 100644 (file)
@@ -4,7 +4,7 @@ SET(libsatsolver_SRCS
     solver.c solverdebug.c repo_solv.c evr.c pool.c
     queue.c repo.c repodata.c repopage.c util.c policy.c solvable.c
     transaction.c rules.c problems.c
-    chksum.c md5.c sha1.c sha2.c)
+    chksum.c md5.c sha1.c sha2.c satversion.c)
 
 ADD_LIBRARY(satsolver STATIC ${libsatsolver_SRCS})
 
diff --git a/src/satversion.c b/src/satversion.c
new file mode 100644 (file)
index 0000000..a70b14a
--- /dev/null
@@ -0,0 +1,13 @@
+/*
+ * Copyright (c) 2009, Novell Inc.
+ *
+ * This program is licensed under the BSD license, read LICENSE.BSD
+ * for further information
+ */
+
+#include "satversion.h"
+
+const char sat_version[] = SATSOLVER_VERSION_STRING;
+int sat_version_major = SATSOLVER_VERSION_MAJOR;
+int sat_version_minor = SATSOLVER_VERSION_MINOR;
+int sat_version_patch = SATSOLVER_VERSION_PATCH;