cmake changes for linux
and also some small fixes