diff options
Diffstat (limited to 'host')
-rw-r--r-- | host/CMakeLists.txt | 2 | ||||
-rw-r--r-- | host/cmake/Modules/UHDPackage.cmake | 8 | ||||
-rw-r--r-- | host/cmake/Modules/UHDVersion.cmake | 19 | ||||
-rw-r--r-- | host/lib/version.cpp | 2 |
4 files changed, 17 insertions, 14 deletions
diff --git a/host/CMakeLists.txt b/host/CMakeLists.txt index 56897bb1f..f14c0bd7c 100644 --- a/host/CMakeLists.txt +++ b/host/CMakeLists.txt @@ -273,5 +273,5 @@ ENDIF(DEFINED UHD_IMAGES_DIR AND EXISTS "${UHD_IMAGES_DIR}") # Print Summary ######################################################################## UHD_PRINT_COMPONENT_SUMMARY() -MESSAGE(STATUS "Building version: ${CPACK_PACKAGE_VERSION}-${UHD_BUILD_INFO}") +MESSAGE(STATUS "Building version: ${UHD_VERSION}") MESSAGE(STATUS "Using install prefix: ${CMAKE_INSTALL_PREFIX}") diff --git a/host/cmake/Modules/UHDPackage.cmake b/host/cmake/Modules/UHDPackage.cmake index 27a43b56e..ef303bc58 100644 --- a/host/cmake/Modules/UHDPackage.cmake +++ b/host/cmake/Modules/UHDPackage.cmake @@ -1,5 +1,5 @@ # -# Copyright 2010-2011 Ettus Research LLC +# Copyright 2010-2012 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 @@ -69,7 +69,7 @@ IF((DEBIAN OR REDHAT) AND LSB_RELEASE_EXECUTABLE) ) #set a more sensible package name for this system - SET(CPACK_PACKAGE_FILE_NAME "UHD-${UHD_VERSION}-${LSB_ID}-${LSB_RELEASE}-${CMAKE_SYSTEM_PROCESSOR}") + SET(CPACK_PACKAGE_FILE_NAME "uhd_${UHD_VERSION}_${LSB_ID}-${LSB_RELEASE}-${CMAKE_SYSTEM_PROCESSOR}") ENDIF() @@ -83,9 +83,7 @@ ENDIF() SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Ettus Research - USRP Hardware Driver") SET(CPACK_PACKAGE_VENDOR "Ettus Research LLC") SET(CPACK_PACKAGE_CONTACT "Ettus Research <support@ettus.com>") -SET(CPACK_PACKAGE_VERSION_MAJOR ${UHD_VERSION_MAJOR}) -SET(CPACK_PACKAGE_VERSION_MINOR ${UHD_VERSION_MINOR}) -SET(CPACK_PACKAGE_VERSION_PATCH ${UHD_VERSION_PATCH}) +SET(CPACK_PACKAGE_VERSION "${UHD_VERSION}") SET(CPACK_RESOURCE_FILE_WELCOME ${CMAKE_SOURCE_DIR}/README.txt) SET(CPACK_RESOURCE_FILE_README ${CMAKE_SOURCE_DIR}/AUTHORS.txt) SET(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/LICENSE.txt) diff --git a/host/cmake/Modules/UHDVersion.cmake b/host/cmake/Modules/UHDVersion.cmake index adc653d87..8f77188ee 100644 --- a/host/cmake/Modules/UHDVersion.cmake +++ b/host/cmake/Modules/UHDVersion.cmake @@ -1,5 +1,5 @@ # -# Copyright 2010-2011 Ettus Research LLC +# Copyright 2010-2012 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 @@ -45,16 +45,21 @@ IF(UHD_BUILD_INFO_DISCOVERY) #grab the git ref id for the current head EXECUTE_PROCESS( WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} - COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD - OUTPUT_VARIABLE _git_rev OUTPUT_STRIP_TRAILING_WHITESPACE - RESULT_VARIABLE _git_rev_result + COMMAND ${GIT_EXECUTABLE} describe --always --abbrev=8 --long + OUTPUT_VARIABLE _git_describe OUTPUT_STRIP_TRAILING_WHITESPACE + RESULT_VARIABLE _git_describe_result ) #only set the build info on success - IF(_git_rev_result EQUAL 0) - SET(UHD_BUILD_INFO ${_git_rev}) + IF(_git_describe_result EQUAL 0) + EXECUTE_PROCESS( + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + COMMAND ${PYTHON_EXECUTABLE} -c "print '${_git_describe}'.split('-',1)[1]" + OUTPUT_VARIABLE UHD_BUILD_INFO OUTPUT_STRIP_TRAILING_WHITESPACE + ) ENDIF() + ENDIF(UHD_BUILD_INFO_DISCOVERY) ######################################################################## -SET(UHD_VERSION "${UHD_VERSION_MAJOR}.${UHD_VERSION_MINOR}.${UHD_VERSION_PATCH}") +SET(UHD_VERSION "${UHD_VERSION_MAJOR}.${UHD_VERSION_MINOR}.${UHD_VERSION_PATCH}-${UHD_BUILD_INFO}") diff --git a/host/lib/version.cpp b/host/lib/version.cpp index 6925b35bc..42880b3c3 100644 --- a/host/lib/version.cpp +++ b/host/lib/version.cpp @@ -33,5 +33,5 @@ UHD_STATIC_BLOCK(print_system_info){ #endif std::string uhd::get_version_string(void){ - return "@UHD_VERSION@-@UHD_BUILD_INFO@"; + return "@UHD_VERSION@"; } |