Skip to content

Commit e9460da

Browse files
committed
set up to use vtk
1 parent 077dcdc commit e9460da

2 files changed

Lines changed: 18 additions & 1 deletion

File tree

Superbuild/Superbuild.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ ENDIF()
368368

369369
IF(WITH_VTK)
370370
LIST(APPEND SCIRUN_CACHE_ARGS
371-
"-DVTK_DIR:PATH=${VTK_INSTALL_DIR}/lib/cmake/vtk-9.6"
371+
"-DVTK_External_Dir:PATH=${VTK_INSTALL_DIR}"
372372
)
373373
ENDIF()
374374

src/CMakeLists.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,18 @@ IF(WITH_OSPRAY)
307307
find_package(ospray 2.0.0 REQUIRED HINTS ${Ospray_External_Dir}/install/ospray)
308308
ENDIF()
309309

310+
IF(WITH_VTK)
311+
set(VTK_DIR ${VTK_External_Dir}/lib/cmake/vtk-9.6)
312+
find_package(VTK REQUIRED COMPONENTS
313+
CommonCore
314+
RenderingCore
315+
RenderingOpenGL2
316+
FiltersCore
317+
IOImage
318+
HINTS ${VTK_DIR}
319+
)
320+
ENDIF()
321+
310322
IF(WIN32)
311323
CONFIG_STANDARD_EXTERNAL( Glew GlewConfig.cmake ${GLEW_DIR} )
312324
INCLUDE(${GLEW_USE_FILE})
@@ -393,6 +405,11 @@ IF(WITH_OSPRAY)
393405
SET(OSPRAY_LIBRARIES ospray)
394406
ENDIF()
395407

408+
# Configure VTK
409+
IF(WITH_VTK)
410+
add_definitions(-DWITH_VTK)
411+
ENDIF()
412+
396413
########################################################################
397414
# Detailed renderer logging
398415

0 commit comments

Comments
 (0)