OpenCV Cmake Issue

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

Source file: http://pastebin.com/n75DS8F8
My CMakeLists.txt:

cmake_minimum_required(VERSION 3.3)
project(Test)
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.