summaryrefslogtreecommitdiff
path: root/cmake/git_version.hpp.in
diff options
context:
space:
mode:
authorDominick Allen <djallen@librehumanitas.org>2024-10-03 09:28:01 -0500
committerDominick Allen <djallen@librehumanitas.org>2024-10-03 09:28:01 -0500
commitb50980ad70684530d55b7adf20de6047ebf53ba2 (patch)
tree576d284c732e2b5bfc7638a23d9bca4c86f5437c /cmake/git_version.hpp.in
parente420eca2b244c303af51534ab09632045a186b21 (diff)
Use a configure file for versioning including git revision.
Diffstat (limited to 'cmake/git_version.hpp.in')
-rw-r--r--cmake/git_version.hpp.in15
1 files changed, 15 insertions, 0 deletions
diff --git a/cmake/git_version.hpp.in b/cmake/git_version.hpp.in
new file mode 100644
index 0000000..ede9623
--- /dev/null
+++ b/cmake/git_version.hpp.in
@@ -0,0 +1,15 @@
+#ifndef GIT_VERSION_HPP
+#define GIT_VERSION_HPP
+
+#include <cstdint>
+
+namespace fud {
+
+constexpr uint8_t FudVersionMajor = @PROJECT_VERSION_MAJOR@;
+constexpr uint8_t FudVersionMinor = @PROJECT_VERSION_MINOR@;
+constexpr uint8_t FudVersionPatch = @PROJECT_VERSION_PATCH@;
+constexpr const char GitHash[] = "@GIT_HASH@";
+
+} // namespace fud
+
+#endif