Correct handling of version numbers

Version number is now taken from the cmake config file and can be setup from the build script.