[vtk-developers] Proposed VTK_USE_VIDEO_FOR_WINDOWS / vfw32 / vtkAVIWriter changes
David Cole
david.cole at kitware.com
Thu Aug 18 12:02:51 EDT 2005
Unless I hear objections, I'll commit the proposed changes within the
next day or so. The cvs diff of VTK/CMakeLists.txt appears at the end of
the email.
Currently, VTK_USE_VIDEO_FOR_WINDOWS:
- defaults to OFF
- has documentation string : "Use Video for Windows for video input."
- depends on VTK_USE_RENDERING and WIN32
- is an "advanced" option
- if ON, includes Hybrid/vtkWin32VideoSource.cxx and, as of yesterday,
IO/vtkAVIWriter.cxx as source files
- if ON, includes vfw32 as a link library for vtkHybrid and vtkIO
I propose:
- Changing the *default* value of VTK_USE_VIDEO_FOR_WINDOWS to the
result of a TRY_COMPILE that tells us whether you can successfully
compile and link against vfw32. (You would still be able to change it or
specify it explicitly.)
- Changing the documentation string of VTK_USE_VIDEO_FOR_WINDOWS to read
"Enable using Video for Windows (vfw32) for video input and output."
- Eliminating the option's dependence on VTK_USE_RENDERING and WIN32 and
relying exlusively on the results of the TRY_COMPILE.
More info:
The TRY_COMPILE would only be executed once if VTK_USE_VIDEO_FOR_WINDOWS
is NOT already defined (from a previous run, in the initial cache or on
the cmake command line...) The source for the TRY_COMPILE is already
checked in to VTK/CMake/vtkTestvfw32.cxx.
This way, if you can link against vfw32, you'll get the vfw32 dependent
stuff included automatically in your VTK build. Our reasoning behind
this change is this: we have the TRY_COMPILE technology and we want to
get the vtkAVIWriter included on Windows builds by default...
Thanks,
David Cole
Kitware, Inc.
===== PROPOSED CHANGE =====
C:\CvsServers\public.kitware.com\VTK>cvs diff CMakeLists.txt
Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/VTK/VTK/CMakeLists.txt,v
retrieving revision 1.334
diff -r1.334 CMakeLists.txt
717a718,743
> # Check for vfw32 support
> IF("VTK_USE_VIDEO_FOR_WINDOWS" MATCHES "^VTK_USE_VIDEO_FOR_WINDOWS$")
> MESSAGE(STATUS "Checking if vfw32 is available")
> TRY_COMPILE(VTK_USE_VIDEO_FOR_WINDOWS_TRY_COMPILE
> ${VTK_BINARY_DIR}/CMakeTmp
> ${VTK_SOURCE_DIR}/CMake/vtkTestvfw32.cxx
> CMAKE_FLAGS "-DLINK_LIBRARIES:STRING=vfw32"
> OUTPUT_VARIABLE OUTPUT)
> IF(VTK_USE_VIDEO_FOR_WINDOWS_TRY_COMPILE)
> MESSAGE(STATUS "Checking if vfw32 is available -- yes")
> SET(VTK_USE_VIDEO_FOR_WINDOWS 1 CACHE BOOL "Enable using Video
for Windows (vfw32) for video input and output.")
> WRITE_FILE(${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log
> "Checking if vfw32 is available "
> "passed with the following output:\n"
> "${OUTPUT}\n" APPEND)
> ELSE(VTK_USE_VIDEO_FOR_WINDOWS_TRY_COMPILE)
> MESSAGE(STATUS "Checking if vfw32 is available -- no")
> SET(VTK_USE_VIDEO_FOR_WINDOWS 0 CACHE BOOL "Enable using Video
for Windows (vfw32) for video input and output.")
> WRITE_FILE(${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log
> "Checking if vfw32 is available "
> "failed with the following output:\n"
> "${OUTPUT}\n" APPEND)
> ENDIF(VTK_USE_VIDEO_FOR_WINDOWS_TRY_COMPILE)
> MARK_AS_ADVANCED(VTK_USE_VIDEO_FOR_WINDOWS)
> ENDIF("VTK_USE_VIDEO_FOR_WINDOWS" MATCHES "^VTK_USE_VIDEO_FOR_WINDOWS$")
>
851,853d876
< VTK_DEPENDENT_OPTION(VTK_USE_VIDEO_FOR_WINDOWS
< "Use Video for Windows for video input." OFF
< "VTK_USE_RENDERING;WIN32" OFF)
861,862c884
< VTK_USE_MPI
< VTK_USE_VIDEO_FOR_WINDOWS)
---
> VTK_USE_MPI)
More information about the vtk-developers
mailing list