Hi, on cmake stage I have a simple branch AddVersionToProjectCommand. This extends the project command to also accept a version number:
project(Foo VERSION 1.2.3 CXX) All that does is setting some more variables (beside PROJECT_NAME, PROJECT_SOURCE_DIR, PROJECT_BINARY_DIR and the <projectName>_... equivalents). When setting a version, you also get PROJECT_VERSION and PROJECT_VERSION_(MAJOR|MINOR|PATCH|TWEAK) variables as well as the <projectName>_... equivalents. These version variables can then be used in other commands/macros/functions which need a version. I modified write_basic_package_version_file() accordingly, so that you can now simply do project(Foo VERSION 1.2.3) ... write_basic_package_version_file(FooConfigVersion.cmake COMPATIBILITY AnyNewerVersion) and this will use the version number from the project() call automatically (if no VERSION has been given explicitely). Comments ? Alex -- 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