Add cmake

This PR supports cmake build system.