diff options
author | Szczepan Zalega <szczepan@nitrokey.com> | 2018-06-19 20:34:31 +0200 |
---|---|---|
committer | Szczepan Zalega <szczepan@nitrokey.com> | 2018-06-19 20:34:31 +0200 |
commit | f00638bb860183f900d7c396d2f7f444821e1db3 (patch) | |
tree | 752bccb49786604ced70e04647cd2303f0b6abcf /version.cc.in | |
parent | e1ef8d79809190c5ac5d540bd4aa376dcfda7e93 (diff) | |
download | libnitrokey-f00638bb860183f900d7c396d2f7f444821e1db3.tar.gz libnitrokey-f00638bb860183f900d7c396d2f7f444821e1db3.tar.bz2 |
DEBUG Initial idea for #119. Better would be having default values in version.cc in repository and overwriting it with CMake via configure file.119-qmake_version_getter
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
Diffstat (limited to 'version.cc.in')
-rw-r--r-- | version.cc.in | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/version.cc.in b/version.cc.in index 0eae647..07ae8e7 100644 --- a/version.cc.in +++ b/version.cc.in @@ -23,15 +23,27 @@ namespace nitrokey { unsigned int get_major_library_version() { + #ifndef PROJECT_VERSION_MAJOR return @PROJECT_VERSION_MAJOR@; + #else + return PROJECT_VERSION_MAJOR; + #endif } unsigned int get_minor_library_version() { + #ifndef PROJECT_VERSION_MINOR return @PROJECT_VERSION_MINOR@; + #else + return PROJECT_VERSION_MINOR; + #endif } const char* get_library_version() { + #ifndef PROJECT_VERSION_GIT return "@PROJECT_VERSION_GIT@"; + #else + return PROJECT_VERSION_GIT; + #endif } } |