This small repo shows how to structure a C project with the CMake build system.
mkdir build && cd build && cmake .. && make && make install
This will install the executable in /usr/local/bin on a Mac OS X.
mkdir build && cd build && cmake .. -DCMAKE_INSTALL_PREFIX=../_install && make && make install