在设置OpenCV_DIR需要将目录设置到OpenCV路径下的share/OpenCV才行:
set(OpenCV_DIR 你的opencv位置/share/OpenCV) find_package(OpenCV 3 REQUIRED)
set(OpenCV_DIR 你的opencv位置/share/OpenCV)
find_package(OpenCV 3 REQUIRED)