Some fixes in cmake files