summaryrefslogtreecommitdiff
path: root/src/Version.h.in
blob: 0d6219c09aeb1c7f0ad5f8ad21105d426e6480d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#pragma once

@VERSION_EDIT_WARNING@

#include <cstdint>

namespace Pinetime {
  class Version {
    public:
      static constexpr uint32_t Major() {return major;}
      static constexpr uint32_t Minor() {return minor;}
      static constexpr uint32_t Patch() {return patch;}
      static constexpr const char* GitCommitHash() {return commitHash;}
      static constexpr const char* VersionString() {return versionString;}
    private:
      static constexpr uint32_t major = @PROJECT_VERSION_MAJOR@;
      static constexpr uint32_t minor = @PROJECT_VERSION_MINOR@;
      static constexpr uint32_t patch = @PROJECT_VERSION_PATCH@;
      static constexpr const char* commitHash = "@PROJECT_GIT_COMMIT_HASH@";
      static constexpr const char* versionString = "@PROJECT_VERSION_MAJOR@.@PROJECT_VERSION_MINOR@.@PROJECT_VERSION_PATCH@";
  };
}