CMake常见问题及解决
1.错误信息如下:
1> [CMake] CMake Error in vendor/opencv-4.5.1/modules/CMakeLists.txt:
1> [CMake] Target "ocv.3rdparty.ffmpeg" INTERFACE_INCLUDE_DIRECTORIES property
1> [CMake] contains path:
1> [CMake]
1> [CMake] "D:/Source/Repos/opencv-4.5.1/3rdparty/ffmpeg/ffmpeg-4.3.1-shared/include"
1> [CMake]
1> [CMake] which is prefixed in the source directory.
解决方案:
"${FFMPEG_INCLUDE_DIRS}>"
修改为:
"$<BUILD_INTERFACE:${FFMPEG_INCLUDE_DIRS}>"