How to generate a CMakeLists.txt file?

EDIT:
Nevermind, I’ve found a better way to approach this.

which is? …