mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=$KDEDIRS -DCMAKE_BUILD_TYPE=Release ..
make
sudo make install
Thanks to discount project
http://www.pell.portland.or.us/~orc/Code/discount
https://gist.github.com/Orc/97b5711dd8c8a3b371928db756eba6e5