build OpenCTM using CMake, merge linux and MacOS build scripts