Advertisement
NoeMurr

vtkRenderWindowInteractor Error under macOS Cmake

Apr 19th, 2019
1,220
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
  3.  
  4. project(Cone)
  5.  
  6. set(VTK_USE_CARBON ON)
  7.  
  8. find_package(VTK COMPONENTS
  9.   vtkCommonCore
  10.   vtkCommonDataModel
  11.   vtkFiltersSources
  12.   vtkInteractionStyle
  13.   vtkRenderingCore
  14.   vtkRenderingFreeType
  15.   vtkRenderingOpenGL2 QUIET)
  16. if (NOT VTK_FOUND)
  17.   message("Skipping Cone: ${VTK_NOT_FOUND_MESSAGE}")
  18.   return ()
  19. endif()
  20. message (STATUS "VTK_VERSION: ${VTK_VERSION}")
  21. if (VTK_VERSION VERSION_LESS "8.90.0")
  22.   # old system
  23.   include(${VTK_USE_FILE})
  24.   add_executable(Cone Cone.cpp)
  25.   target_link_libraries(Cone PRIVATE ${VTK_LIBRARIES})
  26. else ()
  27.   # include all components
  28.   add_executable(Cone Cone.cxx )
  29.   target_link_libraries(Cone PRIVATE ${VTK_LIBRARIES})
  30.   # vtk_module_autoinit is needed
  31.   vtk_module_autoinit(
  32.     TARGETS Cone
  33.     MODULES ${VTK_LIBRARIES}
  34.   )
  35. endif ()
Advertisement
RAW Paste Data Copied
Advertisement