سؤال

I am still a CMake newbie (started learning 3 days ago). In my current CMakeLists.txt, I have the following set directives:

[...]
SET(CPACK_GENERATOR "RPM")
SET(CPACK_PACKAGE_VERSION_MAJOR "3")
SET(CPACK_PACKAGE_VERSION_MINOR "3")
SET(CPACK_PACKAGE_VERSION_PATCH "svn")
SET(CPACK_SYSTEM_NAME "0.el6.x86_64")
[...]

Once I run make package, I got a libcxx-3.3.svn-0.el6.x86_64.rpm.

But IMHO this is "cheating".

According to http://fedoraproject.org/wiki/Packaging:NamingGuidelines#Package_Naming_and_Versioning_Guidelines, ideally I should be able to generate a libcxx-3.3-0.el6.x86_64.rpm instead. But this demands that CPack not to show the CPACK_PACKAGE_VERSION_PATCH.

Nevertheless, according to my trial results, it doesn't seem to be feasible. I would appreciate a hint as to how.

هل كانت مفيدة؟

المحلول

Did you try setting CPACK_PACKAGE_FILE_NAME (without the extension) to the desired name? This is provided so that you can define your own package naming scheme if the default does not suit your needs. See http://www.cmake.org/Wiki/CMake:CPackConfiguration for more details on key CPack variables and what they do.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top