diff options
author | Alex Neundorf <neundorf@kde.org> | 2023-10-14 21:21:34 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-11-27 15:26:37 (GMT) |
commit | 53991e62daf819a91b7c89f4d4899d0f94c7fd12 (patch) | |
tree | 273a48b4e8f0a5a34e54c582fb101e3cb7529b35 /Modules/Internal | |
parent | f2a6d423da1400108327bff5a27647b6d1d90392 (diff) | |
download | CMake-53991e62daf819a91b7c89f4d4899d0f94c7fd12.zip CMake-53991e62daf819a91b7c89f4d4899d0f94c7fd12.tar.gz CMake-53991e62daf819a91b7c89f4d4899d0f94c7fd12.tar.bz2 |
CPack/RPM: Append .rpm to CPACK_RPM_FILE_NAME if missing
Previously we issued an error when the `.rpm` suffix is missing.
Instead, append the suffix automatically. This matches the behavior of
`CPACK_ARCHIVE_FILE_NAME`, to which the archive format suffix is
automatically appended. With this change, developers can simply do
set(CPACK_RPM_comp_FILE_NAME "${CPACK_ARCHIVE_comp_FILE_NAME}")
Diffstat (limited to 'Modules/Internal')
-rw-r--r-- | Modules/Internal/CPack/CPackRPM.cmake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/Internal/CPack/CPackRPM.cmake b/Modules/Internal/CPack/CPackRPM.cmake index 36c0a3f..bc1e082 100644 --- a/Modules/Internal/CPack/CPackRPM.cmake +++ b/Modules/Internal/CPack/CPackRPM.cmake @@ -1563,7 +1563,7 @@ ${TMP_DEBUGINFO_ADDITIONAL_SOURCES} if(NOT CPACK_RPM_FILE_NAME STREQUAL "RPM-DEFAULT") if(CPACK_RPM_FILE_NAME) if(NOT CPACK_RPM_FILE_NAME MATCHES ".*\\.rpm") - message(FATAL_ERROR "'${CPACK_RPM_FILE_NAME}' is not a valid RPM package file name as it must end with '.rpm'!") + set(CPACK_RPM_FILE_NAME "${CPACK_RPM_FILE_NAME}.rpm") endif() else() # old file name format for back compatibility |