summaryrefslogtreecommitdiffstats
path: root/host/cmake/Modules/UHDVersion.cmake
diff options
context:
space:
mode:
authorNicholas Corgan <nick.corgan@ettus.com>2013-02-28 16:00:08 -0800
committerNicholas Corgan <nick.corgan@ettus.com>2013-02-28 16:00:08 -0800
commit58da716bf740704769b38bc97b976dc9635aab4f (patch)
tree520fdd63c9b33eec3322242e3d7dc961286828b6 /host/cmake/Modules/UHDVersion.cmake
parent7868ba1cc40bc174addd0a9dec6c715f13a3d99b (diff)
parent4a320f31432f8f7c50456a20c4de0ca9b0dde017 (diff)
downloaduhd-58da716bf740704769b38bc97b976dc9635aab4f.tar.gz
uhd-58da716bf740704769b38bc97b976dc9635aab4f.tar.bz2
uhd-58da716bf740704769b38bc97b976dc9635aab4f.zip
Merge branch 'maint34' into maint
Diffstat (limited to 'host/cmake/Modules/UHDVersion.cmake')
-rw-r--r--host/cmake/Modules/UHDVersion.cmake19
1 files changed, 18 insertions, 1 deletions
diff --git a/host/cmake/Modules/UHDVersion.cmake b/host/cmake/Modules/UHDVersion.cmake
index 74516f105..6c2d7e36e 100644
--- a/host/cmake/Modules/UHDVersion.cmake
+++ b/host/cmake/Modules/UHDVersion.cmake
@@ -1,5 +1,5 @@
#
-# Copyright 2010-2012 Ettus Research LLC
+# Copyright 2010-2013 Ettus Research LLC
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -30,6 +30,23 @@ SET(UHD_VERSION_MINOR 005)
SET(UHD_VERSION_PATCH 001)
########################################################################
+# Set up DLL resource version numbers
+########################################################################
+
+FUNCTION(DEPAD_NUM input_num output_num)
+ EXECUTE_PROCESS(
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+ COMMAND ${PYTHON_EXECUTABLE} -c "print int('${input_num}')"
+ OUTPUT_VARIABLE depadded_num OUTPUT_STRIP_TRAILING_WHITESPACE
+ )
+ SET(${output_num} ${depadded_num} PARENT_SCOPE)
+ENDFUNCTION(DEPAD_NUM)
+
+DEPAD_NUM(${UHD_VERSION_MAJOR} RC_VERSION_MAJOR)
+DEPAD_NUM(${UHD_VERSION_MINOR} RC_VERSION_MINOR)
+DEPAD_NUM(${UHD_VERSION_PATCH} RC_VERSION_PATCH)
+
+########################################################################
# Version information discovery through git log
########################################################################