changes to cmake file and code to compile on linux