[CMake] CPack patch version getting set erroneously...

Richard Shaw hobbes1069 at gmail.com
Mon Aug 4 15:54:37 EDT 2014


I converted a project from autotools/handmade makefiles to cmake and
afterwards I added NSIS packaging for win32 builds via the cpack
integration.

Everything was fine while the version patch level was being used, but upon
the next release "0.97" w/o a patch level the resultant installer has the
show "0.97.1".

Here's the logic I use:
    set(CPACK_PACKAGE_VERSION_MAJOR ${FREEDV_VERSION_MAJOR})
    set(CPACK_PACKAGE_VERSION_MINOR ${FREEDV_VERSION_MINOR})
    if(FREEDV_VERSION_PATCH)
        set(CPACK_PACKAGE_VERSION_PATCH ${FREEDV_VERSION_PATCH})
    endif(FREEDV_VERSION_PATCH)

Although I have also tried "unset(..." to get it to stop but nothing seems
to work. The resultant file always ends up with at "1" in the patch level.

Thanks,
Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20140804/40fbda6b/attachment-0001.html>


More information about the CMake mailing list