diff options
author | mattprost <matt.prost@ni.com> | 2022-04-29 14:47:09 -0500 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2022-06-10 13:24:04 -0500 |
commit | 72e6df51de5a766889fedcb9970dedd7fcfda6e8 (patch) | |
tree | d16c5a7d1b27710e740775752293c12b62e77ab3 /host/cmake/Modules/UHDVersion.cmake | |
parent | cb8fa61a5bcc576224ab8afa80ed712c31ddd629 (diff) | |
download | uhd-72e6df51de5a766889fedcb9970dedd7fcfda6e8.tar.gz uhd-72e6df51de5a766889fedcb9970dedd7fcfda6e8.tar.bz2 uhd-72e6df51de5a766889fedcb9970dedd7fcfda6e8.zip |
cmake: Add support for fedora rpm versioning
Adds cmake option for replacing dashes in the UHD Component version with
underscores. This is necessary as Fedora package management is now
enforcing the format <Package>-<Version>-<Release> for all rpm builds,
so dashes in the UHD_VERSION from dev branches is not supported.
Signed-off-by: mattprost <matt.prost@ni.com>
Diffstat (limited to 'host/cmake/Modules/UHDVersion.cmake')
-rw-r--r-- | host/cmake/Modules/UHDVersion.cmake | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/host/cmake/Modules/UHDVersion.cmake b/host/cmake/Modules/UHDVersion.cmake index 2261bf357..6854ff4a9 100644 --- a/host/cmake/Modules/UHDVersion.cmake +++ b/host/cmake/Modules/UHDVersion.cmake @@ -148,4 +148,9 @@ else() set(UHD_ABI_VERSION "${UHD_VERSION_MAJOR}.${UHD_VERSION_API}.${UHD_VERSION_ABI}") endif() +if(UNDERSCORE_UHD_VERSION) + string(REPLACE "-" "_" _uhd_version $CACHE{UHD_VERSION}) + set(UHD_VERSION "${_uhd_version}" CACHE STRING "" FORCE) +endif() + set(UHD_COMPONENT "UHD") |