cmake_minimum_required(VERSION 3.19)
project(usevtk)

find_package(VTK REQUIRED COMPONENTS CommonCore CommonDataModel RenderingCore InteractionStyle RenderingOpenGL2)

add_executable(vtkwindow vtkwindow.cxx)
target_link_libraries(vtkwindow
  PRIVATE
    VTK::CommonCore
    VTK::CommonDataModel
    VTK::InteractionStyle
    VTK::RenderingCore
    VTK::RenderingOpenGL2)
vtk_module_autoinit(TARGETS vtkwindow
  MODULES
    VTK::CommonCore
    VTK::CommonDataModel
    VTK::InteractionStyle
    VTK::RenderingCore
    VTK::RenderingOpenGL2)

install(TARGETS vtkwindow RUNTIME DESTINATION "bin")
