I have found that the most straight forward method of building this MPEG2 library is to drop it into the VTK source directory and add it directly into the build system rather than building it separately outside of VTK. Indeed, the VTK MPEG2 distribution has all the necessary CMake hooks required to do just that.
- Once you have un-tarred the VTK source tree cd into VTK/Utilities.
- Un-tar the VTK MPEG2 library here.
- Go back to the root of the VTK source tree and load CMakeLists.txt into your favourite editor.
- Search for 'MPEG2' in the file (line 764 in version 5.2.1, line 793 in version 5.4.0) and about 30 lines below that comment out this line: INCLUDE(${VTK_CMAKE_DIR}/FindMPEG2.cmake OPTIONAL) - CMakeLists.txt uses # as a comment marker.
- In place of that line you need to add the following one: ADD_SUBDIRECTORY(${VTK_SOURCE_DIR}/Utilities/vtkmpeg2encode)