cmake: Fix ffmpeg detection code

ffmpeg headers are supposed to be referenced as libavcodec/avcodec.h.
Therefore, we actually need to find the path to the libavcodec directory, not
avcodec.h.
This commit is contained in:
Mike Gilbert 2012-02-29 00:30:03 -05:00
parent 2f582205a6
commit 13c5e150fd
1 changed files with 2 additions and 4 deletions

View File

@ -13,13 +13,11 @@ if (PKG_CONFIG_FOUND)
endif ( PKG_CONFIG_FOUND )
# avcodec
find_path(AVCODEC_INCLUDE_DIR avcodec.h PATHS ${AVCODEC_INCLUDE_DIRS}
PATH_SUFFIXES libavcodec )
find_path(AVCODEC_INCLUDE_DIR libavcodec/avcodec.h PATHS ${AVCODEC_INCLUDE_DIRS})
find_library(AVCODEC_LIBRARY avcodec PATHS ${AVCODEC_LIBRARY_DIRS})
# avutil
find_path(AVUTIL_INCLUDE_DIR avutil.h PATHS ${AVUTIL_INCLUDE_DIRS}
PATH_SUFFIXES libavutil )
find_path(AVUTIL_INCLUDE_DIR libavutil/avutil.h PATHS ${AVUTIL_INCLUDE_DIRS})
find_library(AVUTIL_LIBRARY avutil PATHS ${AVUTIL_LIBRARY_DIRS})
if(AVCODEC_INCLUDE_DIR AND AVCODEC_LIBRARY)