Commit 620494fa authored by Berk Geveci's avatar Berk Geveci
Browse files

ENH: Cleanup of FFMPEG configuration

parent 124a877f
......@@ -71,9 +71,12 @@ IF(FFMPEG_INCLUDE_DIR)
IF(FFMPEG_avcodec_LIBRARY)
IF(FFMPEG_avformat_LIBRARY)
SET( FFMPEG_FOUND "YES" )
SET( FFMPEG_LIBRARIES
SET( FFMPEG_BASIC_LIBRARIES
${FFMPEG_avcodec_LIBRARY}
${FFMPEG_avformat_LIBRARY}
${FFMPEG_avformat_LIBRARY}
)
SET( FFMPEG_LIBRARIES
${FFMPEG_BASIC_LIBRARIES}
${FFMPEG_vorbis_LIBRARY}
${FFMPEG_dc1394_LIBRARY}
${FFMPEG_vorbisenc_LIBRARY}
......
......@@ -1341,9 +1341,14 @@ FIND_PATH(VTK_DATA_ROOT VTKData.readme
#-----------------------------------------------------------------------------
# FFMPEG
IF(FFMPEG_FOUND)
SET(VTK_USE_FFMPEG_ENCODER 1)
ENDIF(FFMPEG_FOUND)
# If the ffmpeg library is available, use it.
IF (NOT VTK_USE_VIDEO_FOR_WINDOWS)
FIND_PACKAGE(FFMPEG)
IF(FFMPEG_FOUND)
SET(VTK_USE_FFMPEG_ENCODER 1)
ENDIF(FFMPEG_FOUND)
ENDIF (NOT VTK_USE_VIDEO_FOR_WINDOWS)
#-----------------------------------------------------------------------------
# Configure files with settings for use by the build.
CONFIGURE_FILE(${VTK_SOURCE_DIR}/vtkConfigure.h.in
......
......@@ -184,6 +184,15 @@ IF(WIN32)
ENDIF(VTK_USE_VIDEO_FOR_WINDOWS)
ENDIF(WIN32)
#-----------------------------------------------------------------------------
# FFMPEG
# If the ffmpeg library is available, compile vtkFFMPEGWriter.
IF (VTK_USE_FFMPEG_ENCODER)
INCLUDE_DIRECTORIES(${FFMPEG_INCLUDE_DIR})
SET(Kit_SRCS ${Kit_SRCS} vtkFFMPEGWriter.cxx)
SET(KIT_LIBS ${KIT_LIBS} ${FFMPEG_BASIC_LIBRARIES})
ENDIF (VTK_USE_FFMPEG_ENCODER)
# Include mpeg2 writer if the mpeg2 lib has been defined
IF(DEFINED vtkMPEG2Encode_INCLUDE_PATH)
......@@ -192,18 +201,6 @@ IF(DEFINED vtkMPEG2Encode_INCLUDE_PATH)
SET(KIT_LIBS ${KIT_LIBS} vtkMPEG2Encode)
ENDIF(DEFINED vtkMPEG2Encode_INCLUDE_PATH)
# If the ffmpeg library is available, compile vtkFFMPEGWriter.
IF (NOT VTK_USE_VIDEO_FOR_WINDOWS)
FIND_PACKAGE(FFMPEG)
IF(FFMPEG_FOUND)
SET(Kit_SRCS ${Kit_SRCS} vtkFFMPEGWriter.cxx)
INCLUDE_DIRECTORIES(${FFMPEG_INCLUDE_PATH})
SET(KIT_LIBS ${KIT_LIBS} ${FFMPEG_LIBRARIES})
ENDIF(FFMPEG_FOUND)
ENDIF (NOT VTK_USE_VIDEO_FOR_WINDOWS)
SET_SOURCE_FILES_PROPERTIES(
vtkPLY
vtkXMLWriterC
......
......@@ -92,9 +92,6 @@
/* Whether the Tcl/Tk support files are copied to the build dir */
#cmakedefine VTK_TCL_TK_COPY_SUPPORT_LIBRARY
/* Whether FFMPEG is found or not */
#cmakedefine VTK_USE_FFMPEG_ENCODER
/* Configure internal Tk headers. */
#ifdef VTK_USE_CARBON
# define USE_NON_CONST
......
......@@ -89,6 +89,9 @@
/* Whether the real python debug library has been provided. */
#cmakedefine VTK_WINDOWS_PYTHON_DEBUGGABLE
/* Whether FFMPEG is found or not */
#cmakedefine VTK_USE_FFMPEG_ENCODER
/*--------------------------------------------------------------------------*/
/* Setup VTK based on platform features and configuration. */
......
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