Show
Ignore:
Timestamp:
03/04/09 17:35:08 (6 years ago)
Author:
robert
Message:

Added search for headers in ffmpeg directory

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/CMakeModules/FindFFmpeg.cmake

    r9863 r9864  
    1212# Macro to find header and lib directories 
    1313# example: FFMPEG_FIND(AVFORMAT avformat avformat.h) 
     14 
    1415MACRO(FFMPEG_FIND varname shortname headername) 
    1516    # First try to find header directly in include directory 
     
    3536    IF(NOT FFMPEG_${varname}_INCLUDE_DIRS) 
    3637        FIND_PATH(FFMPEG_${varname}_INCLUDE_DIRS lib${shortname}/${headername} 
     38            ${FFMPEG_ROOT}/include 
     39            $ENV{FFMPEG_DIR}/include 
     40            $ENV{OSGDIR}/include 
     41            $ENV{OSG_ROOT}/include 
     42            ~/Library/Frameworks 
     43            /Library/Frameworks 
     44            /usr/local/include 
     45            /usr/include/ 
     46            /sw/include # Fink 
     47            /opt/local/include # DarwinPorts 
     48            /opt/csw/include # Blastwave 
     49            /opt/include 
     50            /usr/freeware/include 
     51        ) 
     52    ENDIF(NOT FFMPEG_${varname}_INCLUDE_DIRS) 
     53 
     54 
     55    # If not found, try to find it in a subdirectory. Tanguy's build has 
     56    # avformat.h in include/libavformat, so this catches that case. If that's 
     57    # standard, perhaps we can keep just this case. 
     58    IF(NOT FFMPEG_${varname}_INCLUDE_DIRS) 
     59        FIND_PATH(FFMPEG_${varname}_INCLUDE_DIRS ffmpeg/${headername} 
    3760            ${FFMPEG_ROOT}/include 
    3861            $ENV{FFMPEG_DIR}/include