migrate to cmake build system