June is coming.
Struggling with opencv in macOs environment, some tips need to be remembered.
check the version of opencv (if you have installed pkg)
pkg-config --modversion opencv
And also I found I have two different OpenCV in my mac,so only 'find_package(OpenCV REQUIRED)' become useless, the version should be assign the same as 'OpenCV_INCLUDE_DIRS'
install opencv with brew and make soft link: