This project is an OpenCV example, just show how to configure CMakeLists.txt. The result of the project :
Just git clone the project and open it with clion, then run it.
I wrote a blog article to install OpenCV on osx or ubuntu, feel free to take a look here.