我正在尝试使用Cpack构建一个名为Debian的正确包.我的CMakeLists.txt中有以下内容:
set(CPACK_PACKAGE_NAME "something")
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "amd64")
set(CPACK_PACKAGE_ARCHITECTURE "amd64")
set(CPACK_PACKAGE_VERSION_MAJOR "0")
set(CPACK_PACKAGE_VERSION_MINOR "9")
set(CPACK_PACKAGE_VERSION_PATCH "0")
set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
但我得到的文件名为:
something-0.9.0-Linux.deb
代替:
something-0.9.0_amd64.deb
我查看了各种文档页面,但没有找到答案.
最佳答案 Cpack没有CPACK_DEBIAN_PACKAGE_FILE_NAME,可能这应该被报告为bug没有所有GNU / Linux-BSD系统都有相同的包命名约定.
目前,您可以将CPACK_PACKAGE_FILE_NAME
设置为默认设置为:
${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_SYSTEM_NAME}.
点击链接阅读完整的文档页面.
07001
The Debian package architecture
06001
您可以将文件名设置为:
set(CPACK_PACKAGE_FILE_NAME“${CPACK_DEBIAN_PACKAGE_NAME} – ${CPACK_DEBIAN_PACKAGE_VERSION} – ${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}.”)
顺便说一句,如果它们是好的,则无需覆盖默认值.
> CPACK_DEBIAN_PACKAGE_ARCHITECTURE默认为dpkg –print-architecture
> CPACK_DEBIAN_PACKAGE_VERSION默认为CPACK_PACKAGE_VERSION,它本身是从major.minor.patch构建的.