Generate CMake using .NET


I have just started to look into the CMake process and trying to create a .NET application that would generate or modify new or existing CMakeLists.txt at the given directory path.
So, just wanted to know if there is any existing tool available to automate this process of creating or modifying CMake files so that I could refer to that tool or instead use that tool rather than reinventing the wheel.

Also, if there isn’t any existing tool as such, please help me by suggesting what all points should I take care of while generating a CMakeLists.txt and how should I start developing this application?

Thanks and Regards,
Kush Mishra