compatibility with opencv version 4.0.0

when i am building the project from two days a demo for jetson, I am getting cmake error saying it is not compatibility with opencv version 3.0.0

CMake Error at CMakeLists.txt:74 (find_package):
Could not find a configuration file for package “OpenCV” that is compatible
with requested version “4.0.0”.

The following configuration files were considered but not accepted:

/usr/share/OpenCV/OpenCVConfig.cmake, version:

– Configuring incomplete, errors occurred!
See also “/home/unizen/jetson-inference/build/CMakeFiles/CMakeOutput.log”.
See also “/home/unizen/jetson-inference/build/CMakeFiles/CMakeError.log”.

but my opencv version is 4.1.1, seems like my pc has more than one opencv version. How can overcome this cmake error in my pc.

Thanks in advance


This is more like a linux and cmake issue. Please try to find out the the search path of cmake and check if opencv4.1.1 is there or not.