On 01/06/2014 04:41 PM, Alexander Neundorf wrote: > 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).
One problem left to address is what to do when a project() command is invoked in a subdirectory. It will set PROJECT_NAME, PROJECT_SOURCE_DIR, and PROJECT_BINARY_DIR but it should also *unset* the PROJECT_VERSION_ variables if no VERSION argument is provided. Otherwise the version values will not be consistent with the project name. -Brad -- 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