Take a look here:
CMake Tutorial — CMake 3.16.2 Documentation[
^]. That should guide you in creating your CMakeList.txt file.
Are you sure you're using cmake, though? Generating a Makefile through cmake should produce a Makefile that is many lines long. In my case, even the simplest cmake script produces a Makefile over 170 lines long.