diff options
Diffstat (limited to 'host/cmake/Modules/UHDConfigVersion.cmake.in')
-rw-r--r-- | host/cmake/Modules/UHDConfigVersion.cmake.in | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/host/cmake/Modules/UHDConfigVersion.cmake.in b/host/cmake/Modules/UHDConfigVersion.cmake.in index 3d09687e1..67e0e408d 100644 --- a/host/cmake/Modules/UHDConfigVersion.cmake.in +++ b/host/cmake/Modules/UHDConfigVersion.cmake.in @@ -32,6 +32,7 @@ set(ENV{UHD_CONFIG_VERSION_USED} TRUE) SET(MAJOR_VERSION @TRIMMED_VERSION_MAJOR@) SET(MINOR_VERSION @TRIMMED_VERSION_MINOR@) SET(PATCH_VERSION @TRIMMED_VERSION_PATCH@) +SET(DEVEL_VERSION @UHD_VERSION_DEVEL@) SET(PACKAGE_VERSION @TRIMMED_UHD_VERSION@) SET(ENV{UHD_PACKAGE_VERSION} ${PACKAGE_VERSION}) @@ -48,6 +49,13 @@ IF(NOT PACKAGE_FIND_VERSION) RETURN() ENDIF(NOT PACKAGE_FIND_VERSION) +# Development branches of UHD don't have a patch version. This is a hack +# to add a fake patch version that should be higher than anything the user +# requests. +IF(DEVEL_VERSION) + SET(PACKAGE_VERSION "${MAJOR_VERSION}.${MINOR_VERSION}.999") +ENDIF(DEVEL_VERSION) + # assume incorrect versioning by default SET(PACKAGE_VERSION_COMPATIBLE FALSE) SET(PACKAGE_VERSION_EXACT FALSE) @@ -164,3 +172,6 @@ ENDIF(UHD_USE_ABI) IF(${PACKAGE_FIND_VERSION} VERSION_EQUAL ${PACKAGE_VERSION}) SET(PACKAGE_VERSION_EXACT TRUE) ENDIF() + +# Undo our patch-version-number hack +SET(PACKAGE_VERSION @TRIMMED_UHD_VERSION@) |