Add CMakeLists for in-tree and out-of-tree build