Redo cmake lists for os detecting
Remerge with grimd34th branch