在设置OpenCV_DIR需要将目录设置到OpenCV路径下的share/OpenCV才行:

set(OpenCV_DIR 你的opencv位置/share/OpenCV)

find_package(OpenCV 3 REQUIRED)

相关文章: