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

vtkRenderingExternal: update to the new module system

parent f46c6717
set(Module_SRCS
ExternalVTKWidget.cxx
vtkExternalLight.cxx
vtkExternalOpenGLCamera.cxx
vtkExternalOpenGLRenderer.cxx
vtkExternalOpenGLRenderWindow.cxx
)
set(classes
ExternalVTKWidget
vtkExternalLight
vtkExternalOpenGLCamera
vtkExternalOpenGLRenderWindow
vtkExternalOpenGLRenderer)
set(${vtk-module}_HDRS
ExternalVTKWidget.h
vtkExternalLight.h
vtkExternalOpenGLCamera.h
vtkExternalOpenGLRenderer.h
vtkExternalOpenGLRenderWindow.h
)
vtk_module_library(vtkRenderingExternal ${Module_SRCS})
include(vtkOpenGL)
vtk_opengl_link(${vtk-module})
set_target_properties(
vtkRenderingExternal
PROPERTIES COMPILE_FLAGS -DVTK_OPENGL2)
vtk_module_add_module(VTK::RenderingExternal
CLASSES ${classes})
vtk_module_definitions(VTK::RenderingExternal
PRIVATE
VTK_OPENGL2)
FIND_PACKAGE(GLUT REQUIRED)
# TODO: Make FindGLUT use imported targets.
find_package(GLUT REQUIRED QUIET)
include_directories(${GLUT_INCLUDE_DIR})
INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
${GLUT_INCLUDE_DIR}
)
VTK_ADD_TEST_CXX(vtkRenderingExternalCxxTests tests
vtk_add_test_cxx(vtkRenderingExternalCxxTests tests
TestGLUTRenderWindow.cxx
)
VTK_TEST_CXX_EXECUTABLE(vtkRenderingExternalCxxTests tests)
TARGET_LINK_LIBRARIES(vtkRenderingExternalCxxTests LINK_PRIVATE
vtkRenderingExternal ${OPENGL_LIBRARIES} ${GLUT_LIBRARY})
include(vtkOpenGL)
vtk_opengl_link(vtkRenderingExternalCxxTests)
vtk_test_cxx_executable(vtkRenderingExternalCxxTests tests)
target_link_libraries(vtkRenderingExternalCxxTests PRIVATE
${GLUT_LIBRARY})
vtk_module(vtkRenderingExternal
TEST_DEPENDS
vtkglew
vtkTestingRendering
EXCLUDE_FROM_ALL
DEPENDS
vtkCommonCore
vtkRenderingOpenGL2
vtkRenderingCore
PRIVATE_DEPENDS
vtkCommonMath
vtkCommonTransforms
vtkRenderingOpenGL2
)
NAME
VTK::RenderingExternal
LIBRARY_NAME
vtkRenderingExternal
DEPENDS
VTK::CommonCore
VTK::RenderingCore
VTK::RenderingOpenGL2
PRIVATE_DEPENDS
VTK::CommonMath
VTK::CommonTransforms
VTK::RenderingOpenGL2
VTK::glew
VTK::opengl
TEST_DEPENDS
VTK::FiltersGeometry
VTK::FiltersSources
VTK::TestingRendering
VTK::opengl
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