Cmake cannot find a package

For instance

find_package( OpenCV REQUIRED )

And the following error came up