Skip to content

Commit

Permalink
Fix VTK Superbuild
Browse files Browse the repository at this point in the history
  • Loading branch information
gdevenyi committed Aug 29, 2016
1 parent 0f7ef98 commit 60e4182
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
17 changes: 17 additions & 0 deletions ANTS.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,25 @@ option(BUILD_ALL_ANTS_APPS "Use All ANTs Apps" ON)
option(USE_VTK "Use VTK Libraries" OFF)
if(USE_VTK)
find_package(VTK)
find_package(VTK COMPONENTS
vtkCommonCore
vtkCommonDataModel
vtkIOGeometry
vtkIOXML
vtkIOLegacy
vtkIOPLY
vtkFiltersModeling
vtkImagingStencil
vtkImagingGeneral
vtkRenderingAnnotation
vtkRenderingVolumeOpenGL
# vtkRenderingVolumeOpenGL2 # VTK7
)

if(VTK_FOUND)
include(${VTK_USE_FILE})
include_directories(${VTK_INCLUDE_DIRS})
set(INIT_VTK_LIBRARIES ${VTK_LIBRARIES})
else(VTK_FOUND)
message("Cannot build some programs without VTK. Please set VTK_DIR if you need these programs.")
endif(VTK_FOUND)
Expand Down
20 changes: 1 addition & 19 deletions Examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -168,26 +168,8 @@ endif(BUILD_ALL_ANTS_APPS)


if(USE_VTK)
find_package(VTK REQUIRED NO_MODULE)
find_package(VTK COMPONENTS
vtkCommonCore
vtkCommonDataModel
vtkIOGeometry
vtkIOXML
vtkIOLegacy
vtkIOPLY
vtkFiltersModeling
vtkImagingStencil
vtkImagingGeneral
vtkRenderingAnnotation
vtkRenderingVolumeOpenGL
# vtkRenderingVolumeOpenGL2 # VTK7
)
include(${VTK_USE_FILE})
include_directories(${VTK_INCLUDE_DIRS})

set(VTK_ANTS_APPS
# ConvertVectorFieldToVTK
# ConvertVectorFieldToVTK
antsSurf
antsVol
GetMeshAndTopology
Expand Down
3 changes: 2 additions & 1 deletion SuperBuild/External_VTK.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,8 @@ if(NOT ( DEFINED "USE_SYSTEM_${extProjName}" AND "${USE_SYSTEM_${extProjName}}"
# -P ${VTKPatchScript}
# )

set(${extProjName}_DIR ${CMAKE_BINARY_DIR}/${proj}-install/lib/vtk-6.2)
set(${extProjName}_DIR ${CMAKE_BINARY_DIR}/${proj}-install)

else()
if(${USE_SYSTEM_${extProjName}})
find_package(${extProjName} ${${extProjName}_REQUIRED_VERSION} REQUIRED)
Expand Down

0 comments on commit 60e4182

Please sign in to comment.