I need to create a RPM of my software expecting the following output: <my_sw_name>-<version>-<release>.rpm.
The default for <release> shall be 0.
In my CMakeLists.txt I am using the following command:
cmake_minimum_required(VERSION 3.20)
...
set(SW_RELEASE 0)
set(CPACK_GENERATOR "RPM")
set(CPACK_RPM_PACKAGE_RELEASE ${SW_RELEASE})
set(CPACK_RPM_PACKAGE_RELEASE_DIST OFF)
set(CPACK_RPM_FILE_NAME "RPM-DEFAULT")
...
Nevertheless, the generated RPM filename is <my_sw_name>-<version>-1.rpm.
Is this a bug in CPack or did I miss something?