update CMake script so that it would be on par with autotools+make (note: configuration parameters are passed in as environment variables)