Build 将CMake项目指向特定的包含文件

Build 将CMake项目指向特定的包含文件,build,opencv,ffmpeg,cmake,Build,Opencv,Ffmpeg,Cmake,我正在尝试构建启用FFMPEG的OpenCV 2.3.0。由于Ubuntu11.10只提供版本为0.7的libavcodec/格式,而ticket#1020(下面的链接)表明它应该与0.8兼容 如果我尝试编译,会出现以下错误: [ 18%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/cap_ffmpeg.o In file included from /home/chris/src/OpenCV-2

我正在尝试构建启用FFMPEG的OpenCV 2.3.0。由于Ubuntu11.10只提供版本为0.7的libavcodec/格式,而ticket#1020(下面的链接)表明它应该与0.8兼容

如果我尝试编译,会出现以下错误:

[ 18%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/cap_ffmpeg.o
In file included from /home/chris/src/OpenCV-2.3.0/modules/highgui/src/cap_ffmpeg.cpp:45:0:
/home/foo/src/OpenCV-2.3.0/modules/highgui/src/cap_ffmpeg_impl.hpp:103:36: fatal error: libavformat/avformat.h: No such file or directory
compilation terminated.
此文件位于
/opt/linux64 debug/include/ffmpeg/libavformat/avformat.h
中。我试着用CMAKE_INCLUDE{DIRECTORY,PATH},CMAKE_PREFIX_PATH和CMAKE_LIBRARY_PATH将make指向这一点。这些都不管用。(我总是使用路径
/opt/linux64 debug/include/ffmpeg


尝试
包含目录()
命令。在我的CMakeLists.txt文件中,我是这样使用它的:

include_directories(. /opt/special/headers/in/here)

add_executable(helloworld helloworld.c)

我从来没有遇到过任何问题。

尝试使用
include\u directories()
命令。在我的CMakeLists.txt文件中,我是这样使用它的:

include_directories(. /opt/special/headers/in/here)

add_executable(helloworld helloworld.c)
我从来没有遇到过任何问题