Patch #31563: Additional include directory for FFMPEG
authorSergey Sharybin <sergey.vfx@gmail.com>
Sun, 27 May 2012 13:44:21 +0000 (13:44 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Sun, 27 May 2012 13:44:21 +0000 (13:44 +0000)
Fedora 16 is still using /usr/include/ffmpeg, not /usr/include to store FFmpeg's
headers. Added it to search paths.

Also remove FFmpeg include directory listed in FFMPEG_INCLUDE_DIRS twice

Patch by Arno Mayrhofer (aka azrael3000), thanks!

CMakeLists.txt

index f7675daf27ac6e7dc32b2a405bf0befd4acf756b..4d0df909453f4f163dc94e842d629f17ee41a4f3 100644 (file)
@@ -558,7 +558,7 @@ if(UNIX AND NOT APPLE)
                endif()
 
                mark_as_advanced(FFMPEG)
-               set(FFMPEG_INCLUDE_DIRS ${FFMPEG}/include)
+               set(FFMPEG_INCLUDE_DIRS ${FFMPEG}/include ${FFMPEG}/include/ffmpeg)
                mark_as_advanced(FFMPEG_LIBRARIES)
                set(FFMPEG_LIBPATH ${FFMPEG}/lib)
                set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__STDC_CONSTANT_MACROS")
@@ -1106,7 +1106,7 @@ elseif(WIN32)
 
                if(WITH_CODEC_FFMPEG)
                        set(FFMPEG ${LIBDIR}/ffmpeg)
-                       set(FFMPEG_INCLUDE_DIRS ${FFMPEG}/include ${FFMPEG}/include)
+                       set(FFMPEG_INCLUDE_DIRS ${FFMPEG}/include)
                        if(WITH_MINGW64)
                                set(FFMPEG_LIBRARIES avcodec.dll avformat.dll avdevice.dll avutil.dll swscale.dll swresample.dll)
                        else()