set(CPACK_GENERATOR "RPM")
set(CPACK_RPM_FILE_NAME RPM-DEFAULT)

# https://cmake.org/cmake/help/latest/module/CPack.html
# https://cmake.org/cmake/help/latest/cpack_gen/rpm.html#cpack_gen:CPack%20RPM%20Generator

set(CPACK_RPM_PACKAGE_MAINTAINER ${CPACK_PACKAGE_CONTACT})
set(CPACK_RPM_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION})
set(CPACK_RPM_PACKAGE_VERSION ${PROJECT_VERSION})

#set(CPACK_RPM_PACKAGE_DEPENDS "libc6 (>= 2.3.1-6), libc6 (<< 3)")
#set(CPACK_RPM_PACKAGE_DEPENDS "cssrobopec,libqt4-xml,libqt4-network,libqtgui4,treeupdatablereeti")
#set(CPACK_RPM_PACKAGE_CONTROL_EXTRA "${CMAKE_CURRENT_SOURCE_DIR}/Debian/postinst")
set(CPACK_RPM_PACKAGE_AUTOPROV YES)

#set(CPACK_RPM_PACKAGE_LICENSE  ${CPACK_RESOURCE_FILE_LICENSE})
set(CPACK_RPM_PACKAGE_HOMEPAGE ${CPACK_PACKAGE_HOMEPAGE})


set(CPACK_TARGET_FILE_NAME "${PROJECT_NAME}-${PROJECT_VERSION}-1.${CMAKE_SYSTEM_PROCESSOR}.rpm")
#set(CPACK_TARGET_FILE_NAME "${CPACK_RPM_FILE_NAME}")
message(STATUS "CPACK_RPM_FILE_NAME = ${CPACK_RPM_FILE_NAME}")
