rewrote the opencs cmake scripts (more compact and no more annoying warnings)