Commit b62ce641 authored by Dave Demarle's avatar Dave Demarle
Browse files

BUG: FFMPEG linking fixes. Give ParaView access to VTK's FindFFMPEG. Don't...

BUG: FFMPEG linking fixes. Give ParaView access to VTK's FindFFMPEG. Don't fail if FIND can't find the library, instead give the user a chance to specify where it is. Don't automatically link against the library if it is found, because FFMPEG is likely to be too old to use. Give the user one variable to control whether it should be linked, and only show that if the lib is found.
parent ac918c50
......@@ -26,27 +26,27 @@ FIND_LIBRARY(FFMPEG_avcodec_LIBRARY avcodec
/usr/lib
)
FIND_LIBRARY(FFMPEG_vorbis_LIBRARY vorbis
FIND_LIBRARY(FFMPEG_avutil_LIBRARY avutil
/usr/local/lib
/usr/lib
)
FIND_LIBRARY(FFMPEG_dc1394_LIBRARY dc1394_control
FIND_LIBRARY(FFMPEG_vorbis_LIBRARY vorbis
/usr/local/lib
/usr/lib
)
FIND_LIBRARY(FFMPEG_vorbisenc_LIBRARY vorbisenc
FIND_LIBRARY(FFMPEG_dc1394_LIBRARY dc1394_control
/usr/local/lib
/usr/lib
)
FIND_LIBRARY(FFMPEG_theora_LIBRARY theora
FIND_LIBRARY(FFMPEG_vorbisenc_LIBRARY vorbisenc
/usr/local/lib
/usr/lib
)
FIND_LIBRARY(FFMPEG_avutil_LIBRARY avutil
FIND_LIBRARY(FFMPEG_theora_LIBRARY theora
/usr/local/lib
/usr/lib
)
......@@ -68,36 +68,38 @@ FIND_LIBRARY(FFMPEG_z_LIBRARY z
IF(FFMPEG_INCLUDE_DIR)
IF(FFMPEG_avcodec_LIBRARY)
IF(FFMPEG_avformat_LIBRARY)
SET( FFMPEG_FOUND "YES" )
SET( FFMPEG_BASIC_LIBRARIES
${FFMPEG_avcodec_LIBRARY}
${FFMPEG_avformat_LIBRARY}
)
SET( FFMPEG_LIBRARIES
${FFMPEG_BASIC_LIBRARIES}
${FFMPEG_vorbis_LIBRARY}
${FFMPEG_dc1394_LIBRARY}
${FFMPEG_vorbisenc_LIBRARY}
${FFMPEG_theora_LIBRARY}
${FFMPEG_avutil_LIBRARY}
${FFMPEG_dts_LIBRARY}
${FFMPEG_gsm_LIBRARY}
${FFMPEG_z_LIBRARY})
ENDIF(FFMPEG_avformat_LIBRARY)
ENDIF(FFMPEG_avcodec_LIBRARY)
IF(FFMPEG_avformat_LIBRARY)
IF(FFMPEG_avcodec_LIBRARY)
IF(FFMPEG_avutil_LIBRARY)
SET( FFMPEG_FOUND "YES" )
SET( FFMPEG_BASIC_LIBRARIES
${FFMPEG_avcodec_LIBRARY}
${FFMPEG_avformat_LIBRARY}
${FFMPEG_avutil_LIBRARY}
)
SET( FFMPEG_LIBRARIES
${FFMPEG_BASIC_LIBRARIES}
${FFMPEG_vorbis_LIBRARY}
${FFMPEG_dc1394_LIBRARY}
${FFMPEG_vorbisenc_LIBRARY}
${FFMPEG_theora_LIBRARY}
${FFMPEG_dts_LIBRARY}
${FFMPEG_gsm_LIBRARY}
${FFMPEG_z_LIBRARY})
ENDIF(FFMPEG_avutil_LIBRARY)
ENDIF(FFMPEG_avcodec_LIBRARY)
ENDIF(FFMPEG_avformat_LIBRARY)
ENDIF(FFMPEG_INCLUDE_DIR)
MARK_AS_ADVANCED(
FFMPEG_INCLUDE_DIR
FFMPEG_avcodec_LIBRARY
FFMPEG_avformat_LIBRARY
FFMPEG_avcodec_LIBRARY
FFMPEG_avutil_LIBRARY
FFMPEG_vorbis_LIBRARY
FFMPEG_dc1394_LIBRARY
FFMPEG_vorbisenc_LIBRARY
FFMPEG_theora_LIBRARY
FFMPEG_avutil_LIBRARY
FFMPEG_dts_LIBRARY
FFMPEG_gsm_LIBRARY
FFMPEG_z_LIBRARY
......
......@@ -1343,9 +1343,9 @@ FIND_PATH(VTK_DATA_ROOT VTKData.readme
# FFMPEG
# If the ffmpeg library is available, use it.
IF (NOT VTK_USE_VIDEO_FOR_WINDOWS)
FIND_PACKAGE(FFMPEG)
INCLUDE(${VTK_SOURCE_DIR}/CMake/FindFFMPEG.cmake OPTIONAL)
IF(FFMPEG_FOUND)
SET(VTK_USE_FFMPEG_ENCODER 1)
SET(VTK_USE_FFMPEG_ENCODER CACHE BOOL "If the FFMPEG library is available, should VTK use it for saving .avi animation files?")
ENDIF(FFMPEG_FOUND)
ENDIF (NOT VTK_USE_VIDEO_FOR_WINDOWS)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment