Add CMakeLists.txt to build the command-line generator. Add cmake integration macros