First you should make a directory for building, say "build". Enter the directory.
mkdir build
cd build
Use "cmake" to configure the building environment.
cmake ..
Now CMake generated the "Makefile", so...
make
sudo make install
And everything is ready to go.