2014-02-03 Brad King <brad.k...@kitware.com>: > On 02/02/2014 03:49 PM, Stephen Kelly wrote: >> Should this topic set the CPACK_PROJECT_VERSION variable? Or should cpack >> first try to read PROJECT_VERSION, and only use CPACK_PROJECT_VERSION as a >> fallback? > > I think it should read CPACK_PROJECT_VERSION and if that is not set > then try PROJECT_VERSION. The CPACK_ name is more specific.
+1 this has always been the case: i.e. prefer more specific var if defined. Have a look at CPack.cmake and you'll see statement like: cpack_set_if_not_set(CPACK_PACKAGE_NAME "${CMAKE_PROJECT_NAME}") in the same way you may have CPack generator specific var as well, like: CPACK_RPM_PACKAGE_NAME. This last var is used by RPM generator. It gets its default value from CPACK_PACKAGE_NAME unless it has been set by the user. that said "CPACK_PROJECT_VERSION" does not currently exist. however there is: CPACK_PACKAGE_VERSION CPACK_PACKAGE_VERSION_MAJOR CPACK_PACKAGE_VERSION_MINOR CPACK_PACKAGE_VERSION_PATCH currently MAJOR/MINOR/PATCH have a default builtin value "0.1.1". Those variables define the **package** version which may or may not be the same as **project/software** version. i.e. the version of the package may be different as the version of the thing being packaged. So do you want: 1) to create new "CPACK_PROJECT_VERSION" vars? If yes, what is the purpose? 2) feed current "CPACK_PACKAGE_VERSION*" vars with the one found in CMAKE_PROJECT_VERSION*" ? If 2) this will change the default behavior (sorry if I loose the track of default behavior with or without the ploicy). -- Erk L'élection n'est pas la démocratie -- http://www.le-message.org -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers