Below is a cheat sheet for the most common statements you will use in a CMakeLists.txt file!
By no means is this a complete reference guide, even for the mentioned functions (commonly they are just depicted in their most used form). For full documentation, see https://cmake.org/documentation/.
Sorted roughly by in which order you would use them (i.e. from compiling to linking).
set(srcs file1.c file2.c ...)
Creates a variable (e.g. src ), and assigns something to it (e.g. the list file1.c file2.c). To clear a variable, do not provide second argument, e.g. set(srcs).
include_directories(dir1 dir2 ...)
Adds the provided directory paths to the compilers list of directories that it will search for include files in, for any following targets.
Links the provided libraries to the specific target library. link_libraries() can be used to apply to libraries to all following targets (i.e. no specific target is provided), however, it is deprecated.
Used to place build output into certain directories on the user's system (as well as do things like assign privileges to these files).