[CMake] [CPack.cmake] take into account CPACK_PACKAGE_VERSION_xxxxxxxxx only once

Alexander Neundorf a.neundorf-work at gmx.net
Wed Mar 26 20:21:44 EDT 2008


On Thursday 27 March 2008, Jerome Arbez-Gindre wrote:
> 2008/3/26, Alexander Neundorf <a.neundorf-work at gmx.net>:
> > On Friday 21 March 2008, Jerome Arbez-Gindre wrote:
> > > Hi,
> > >
> > > I have noticed that the overwriting of CPACK_PACKAGE_VERSION have no
> >
> > impact
> >
> > > on the .deb packages file name (and have impact on sources packages).
> > >
> > > I propose to use the CPACK_PACKAGE_VERSION_xxxxxxxxx macros only once
> > > to set (if not set !) the CPACK_PACKAGE_VERSION and then only use the
> > > CPACK_PACKAGE_VERSION macro:
> >
> > So your problem is that you set CPACK_PACKAGE_VERSION directly but not
> > CPACK_PACKAGE_VERSION_[MAJOR|MINOR|PATCH], and and so you get the
> > defaults for these three variables for the package name ?
>
> Yes, This is exactly my problem:
> if I set CPACK_PACKAGE_VERSION with any value, i would expect not building
> a  my_package.0.0.1-source.tar.gz
>
> if I want a correct behavior (on my point of view ;-), I have to put in my
> CMakeLists.txt :(
>
> SET(CPACK_PACKAGE_VERSION "anything.I-Want")
> SET(CPACK_PACKAGE_FILE_NAME
> "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_SYSTEM_NAME}")
> SET(CPACK_SOURCE_PACKAGE_FILE_NAME
> "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-Source")
>
> instead of a simple
> SET(CPACK_PACKAGE_VERSION "anything.I-Want")

Committed, but I kept the CPACK_SYSTEM_NAME.
If you want something completely custom, setting CPACK_PACKAGE_FILE_NAME 
directly should work.

Alex


More information about the CMake mailing list