summaryrefslogtreecommitdiffstats
path: root/host/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'host/cmake')
-rw-r--r--host/cmake/Modules/UHDPackage.cmake7
-rw-r--r--host/cmake/Modules/UHDVersion.cmake12
2 files changed, 17 insertions, 2 deletions
diff --git a/host/cmake/Modules/UHDPackage.cmake b/host/cmake/Modules/UHDPackage.cmake
index 06e7750b6..0feaf91f3 100644
--- a/host/cmake/Modules/UHDPackage.cmake
+++ b/host/cmake/Modules/UHDPackage.cmake
@@ -96,6 +96,13 @@ SET(CPACK_RESOURCE_FILE_README ${CMAKE_SOURCE_DIR}/AUTHORS.txt)
SET(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/LICENSE.txt)
########################################################################
+# Setup CPack Source
+########################################################################
+
+SET(CPACK_SOURCE_PACKAGE_FILE_NAME "uhd-source_${UHD_VERSION}")
+SET(CPACK_SOURCE_IGNORE_FILES "\\\\.git*")
+
+########################################################################
# Setup CPack Components
########################################################################
SET(CPACK_COMPONENT_LIBRARIES_GROUP "Development")
diff --git a/host/cmake/Modules/UHDVersion.cmake b/host/cmake/Modules/UHDVersion.cmake
index 6b1d84941..74516f105 100644
--- a/host/cmake/Modules/UHDVersion.cmake
+++ b/host/cmake/Modules/UHDVersion.cmake
@@ -27,7 +27,7 @@ FIND_PACKAGE(Git QUIET)
########################################################################
SET(UHD_VERSION_MAJOR 003)
SET(UHD_VERSION_MINOR 005)
-SET(UHD_VERSION_PATCH 000)
+SET(UHD_VERSION_PATCH 001)
########################################################################
# Version information discovery through git log
@@ -65,10 +65,18 @@ ENDIF()
IF(UHD_RELEASE_MODE)
SET(UHD_GIT_HASH ${UHD_RELEASE_MODE})
+
+ #Ignore UHD_GIT_COUNT in UHD_VERSION if the string 'release' is in UHD_RELEASE_MODE
+ EXECUTE_PROCESS(
+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+ COMMAND ${PYTHON_EXECUTABLE} -c "print 'release' in '${UHD_RELEASE_MODE}'"
+ OUTPUT_VARIABLE TRIM_UHD_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE
+ )
ENDIF()
+
########################################################################
-IF(UHD_RELEASE_MODE STREQUAL "release")
+IF(TRIM_UHD_VERSION STREQUAL "True")
SET(UHD_VERSION "${UHD_VERSION_MAJOR}.${UHD_VERSION_MINOR}.${UHD_VERSION_PATCH}-${UHD_GIT_HASH}")
ELSE()
SET(UHD_VERSION "${UHD_VERSION_MAJOR}.${UHD_VERSION_MINOR}.${UHD_VERSION_PATCH}-${UHD_GIT_COUNT}-${UHD_GIT_HASH}")