]> Creatis software - clitk.git/commitdiff
Don't use VTK_LIBRAARIES with old VTK versions
authorVivien Delmon <vivien.delmon@creatis.insa-lyon.fr>
Fri, 21 Oct 2011 11:37:48 +0000 (13:37 +0200)
committerVivien Delmon <vivien.delmon@creatis.insa-lyon.fr>
Fri, 21 Oct 2011 11:37:48 +0000 (13:37 +0200)
tools/CMakeLists.txt

index 5222f12b9650d8d0ba9e42fca6b5f3530d942d34..e9bb7f12d4539f20e53b943d702c445e19423fff 100644 (file)
@@ -348,7 +348,11 @@ IF (CLITK_BUILD_TOOLS)
 
     WRAP_GGO(clitkMeshToBinaryImage_GGO_C clitkMeshToBinaryImage.ggo)
     ADD_EXECUTABLE(clitkMeshToBinaryImage clitkMeshToBinaryImage.cxx ${clitkMeshToBinaryImage_GGO_C})
-    TARGET_LINK_LIBRARIES(clitkMeshToBinaryImage clitkCommon ${ITK_LIBRARIES} ${VTK_LIBRARIES})
+    IF(VTK_MAJOR_VERSION > 5 OR (VTK_MAJOR_VERSION == 5 AND VTK_MINOR_VERION >= 8))
+      TARGET_LINK_LIBRARIES(clitkMeshToBinaryImage clitkCommon ${ITK_LIBRARIES} ${VTK_LIBRARIES})
+    ELSE(VTK_MAJOR_VERSION > 5 OR (VTK_MAJOR_VERSION == 5 AND VTK_MINOR_VERION >= 8))
+      TARGET_LINK_LIBRARIES(clitkMeshToBinaryImage clitkCommon ${ITK_LIBRARIES} vtkHybrid vtkIO)
+    ENDIF(VTK_MAJOR_VERSION > 5 OR (VTK_MAJOR_VERSION == 5 AND VTK_MINOR_VERION >= 8))
     SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkMeshToBinaryImage)
 
     WRAP_GGO(clitkMeshViewer_GGO_C clitkMeshViewer.ggo)