Further progress: porting existing wscript to cmake.