Added search for headers in ffmpeg directory

This commit is contained in:
Robert Osfield
2009-03-04 16:35:08 +00:00
parent 273be5f0ae
commit 56330d5b29

View File

@@ -11,6 +11,7 @@
# Macro to find header and lib directories
# example: FFMPEG_FIND(AVFORMAT avformat avformat.h)
MACRO(FFMPEG_FIND varname shortname headername)
# First try to find header directly in include directory
FIND_PATH(FFMPEG_${varname}_INCLUDE_DIRS ${headername}
@@ -50,6 +51,28 @@ MACRO(FFMPEG_FIND varname shortname headername)
)
ENDIF(NOT FFMPEG_${varname}_INCLUDE_DIRS)
# If not found, try to find it in a subdirectory. Tanguy's build has
# avformat.h in include/libavformat, so this catches that case. If that's
# standard, perhaps we can keep just this case.
IF(NOT FFMPEG_${varname}_INCLUDE_DIRS)
FIND_PATH(FFMPEG_${varname}_INCLUDE_DIRS ffmpeg/${headername}
${FFMPEG_ROOT}/include
$ENV{FFMPEG_DIR}/include
$ENV{OSGDIR}/include
$ENV{OSG_ROOT}/include
~/Library/Frameworks
/Library/Frameworks
/usr/local/include
/usr/include/
/sw/include # Fink
/opt/local/include # DarwinPorts
/opt/csw/include # Blastwave
/opt/include
/usr/freeware/include
)
ENDIF(NOT FFMPEG_${varname}_INCLUDE_DIRS)
FIND_LIBRARY(FFMPEG_${varname}_LIBRARIES
NAMES ${shortname}
PATHS