Commit adc23470 authored by Utkarsh Ayachit's avatar Utkarsh Ayachit Committed by Ben Boeckel

vtkIOMovie: update to the new module system

Also split out vtkIOMovie into vtkIOMovie and vtkIOOggTheora to avoid
optional dependency between modules.
parent 703061e8
set(Module_SRCS
vtkGenericMovieWriter.cxx
)
set(classes
vtkGenericMovieWriter)
set (VTK_HAS_OGGTHEORA_SUPPORT)
if(vtkIOMovie_vtkoggtheora)
set (VTK_HAS_OGGTHEORA_SUPPORT TRUE)
list(APPEND Module_SRCS vtkOggTheoraWriter.cxx)
endif()
if(WIN32)
if (WIN32)
# Check if VideoForWindows is supported. This also adds an option
# VTK_USE_VIDEO_FOR_WINDOWS that is set to ON/OFF by default based on
# whether VideoForWindows was found.
include(vtkTestVideoForWindows)
endif()
if(WIN32 AND VTK_USE_VIDEO_FOR_WINDOWS)
list(APPEND Module_SRCS vtkAVIWriter.cxx)
endif()
# Configure the module specific settings into a module configured header.
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/vtkIOMovieConfigure.h.in
${CMAKE_CURRENT_BINARY_DIR}/vtkIOMovieConfigure.h)
set(vtkIOMovie_HDRS
${CMAKE_CURRENT_BINARY_DIR}/vtkIOMovieConfigure.h)
if (VTK_USE_VIDEO_FOR_WINDOWS)
list(APPEND classes vtkAVIWriter)
endif ()
endif ()
vtk_module_library(vtkIOMovie ${Module_SRCS})
vtk_module_add_module(VTK::IOMovie
CLASSES ${classes})
if(WIN32 AND VTK_USE_VIDEO_FOR_WINDOWS)
vtk_module_link_libraries(vtkIOMovie LINK_PRIVATE vfw32)
endif()
if (WIN32 AND VTK_USE_VIDEO_FOR_WINDOWS)
vtk_module_link(VTK::IOMovie
PRIVATE
vfw32)
endif ()
if(NOT CMAKE_C_COMPILER_ID STREQUAL "XL")
if(NOT ${CMAKE_CROSSCOMPILING})
set(vtkIOMovie_vtkoggtheora vtktheora)
endif()
endif()
vtk_module(vtkIOMovie
GROUPS
StandAlone
TEST_DEPENDS
vtkTestingCore
vtkImagingCore
vtkImagingSources
KIT
vtkIO
DEPENDS
${vtkIOMovie_vtkoggtheora}
vtkCommonExecutionModel
PRIVATE_DEPENDS
vtkCommonCore
vtkCommonDataModel
vtkCommonMisc
vtkCommonSystem
)
NAME
VTK::IOMovie
LIBRARY_NAME
vtkIOMovie
KIT
VTK::IO
GROUPS
StandAlone
DEPENDS
VTK::CommonExecutionModel
PRIVATE_DEPENDS
VTK::CommonCore
VTK::CommonDataModel
VTK::CommonMisc
VTK::CommonSystem
TEST_DEPENDS
VTK::ImagingCore
VTK::ImagingSources
VTK::TestingCore
/*=========================================================================
Program: Visualization Toolkit
Module: vtkIOMovieConfigure.h.in
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#ifndef vtkIOMovieConfigure_h
#define vtkIOMovieConfigure_h
/* This header contains build settings for the vtkIOMovie module */
// If vtkOggTheoraWriter is enabled.
#cmakedefine VTK_HAS_OGGTHEORA_SUPPORT
#endif
set(classes
vtkOggTheoraWriter)
vtk_module_add_module(VTK::IOOggTheora
CLASSES ${classes})
# this is for legacy codes, should be dropped.
vtk_module_definitions(VTK::IOOggTheora
INTERFACE VTK_HAS_OGGTHEORA_SUPPORT)
NAME
VTK::IOOggTheora
LIBRARY_NAME
vtkIOOggTheora
CONDITION
NOT CMAKE_C_COMPILER_ID STREQUAL "XL" AND NOT CMAKE_CROSSCOMPILING
KIT
VTK::IO
GROUPS
StandAlone
DEPENDS
VTK::CommonExecutionModel
VTK::IOMovie
PRIVATE_DEPENDS
VTK::CommonCore
VTK::CommonDataModel
VTK::CommonMisc
VTK::CommonSystem
VTK::theora
......@@ -29,12 +29,12 @@
#ifndef vtkOggTheoraWriter_h
#define vtkOggTheoraWriter_h
#include "vtkIOMovieModule.h" // For export macro
#include "vtkIOOggTheoraModule.h" // For export macro
#include "vtkGenericMovieWriter.h"
class vtkOggTheoraWriterInternal;
class VTKIOMOVIE_EXPORT vtkOggTheoraWriter : public vtkGenericMovieWriter
class VTKIOOGGTHEORA_EXPORT vtkOggTheoraWriter : public vtkGenericMovieWriter
{
public:
static vtkOggTheoraWriter *New();
......@@ -95,6 +95,3 @@ private:
};
#endif
Markdown is supported
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