build: fix RPM package name
@@ -665,8 +665,6 @@ set(CPACK_PACKAGE_VENDOR "Treasure Data")
set(CPACK_PACKAGING_INSTALL_PREFIX "/opt/td-agent-bit")
set(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE")
set(CPACK_PACKAGING_INSTALL_PREFIX "/")
-set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_PACKAGE_RELEASE}.${CMAKE_SYSTEM_PROCESSOR}")
-
# RPM Generation information
set(CPACK_RPM_PACKAGE_GROUP "System Environment/Daemons")
@@ -689,6 +687,9 @@ set(CPACK_RPM_USER_FILELIST
"%ignore /opt"
"%ignore /etc")
set(CPACK_RPM_PACKAGE_AUTOREQ ON)
+if(CPACK_GENERATOR MATCHES "RPM")
+ set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_PACKAGE_RELEASE}.${CMAKE_SYSTEM_PROCESSOR}")
+endif()
# CPack: DEB
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
