OpenCV Cmake Issue

I can't get it to work because of a weird error in CLion upon saving my CMakeLists:
Error:Found package configuration file:
but it set OpenCV_FOUND to FALSE so package "OpenCV" is considered to be NOT FOUND.

Source file:
My CMakeLists.txt:

cmake_minimum_required(VERSION 3.3)
find_package( OpenCV REQUIRED )
add_executable( Test main.cpp )
target_link_libraries( Test ${OpenCV_LIBS} )

The fact is when I manually "cmake ." & "make" (with all the same CMakeLists file) my project from console it works just fine with no errors.
What should I do?

Please sign in to leave a comment.