summaryrefslogtreecommitdiff
blob: 2fec72e1f4f3237b827fb27704939b64b430521e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
--- visit2.8.2/src/CMake/FindVisItVTK.cmake.orig	2015-01-09 12:18:54.467780216 +0100
+++ visit2.8.2/src/CMake/FindVisItVTK.cmake	2015-01-09 12:19:59.737780932 +0100
@@ -234,15 +234,22 @@
 
 # check for python wrappers
 IF (NOT WIN32)
-    FILE(GLOB VTK_PY_WRAPPERS_DIR ${VTK_LIBRARY_DIRS}/python*/)
+	FILE(GLOB VTK_PY_WRAPPERS_DIRECTORIES ${VTK_LIBRARY_DIRS}/python*/)
 ELSE (NOT WIN32)
     IF(${VTK_VERSION} VERSION_LESS "6.1.0")
-        FILE(GLOB VTK_PY_WRAPPERS_DIR ${VISIT_VTK_DIR}/lib)
+	    FILE(GLOB VTK_PY_WRAPPERS_DIRECTORIES ${VISIT_VTK_DIR}/lib)
     ELSE()
-        FILE(GLOB VTK_PY_WRAPPERS_DIR ${VISIT_VTK_DIR}/lib/python*)
+	    FILE(GLOB VTK_PY_WRAPPERS_DIRECTORIES ${VISIT_VTK_DIR}/lib/python*)
     ENDIF()
 ENDIF (NOT WIN32)
-MESSAGE(STATUS "  VTK_PY_WRAPPERS_DIR=${VTK_PY_WRAPPERS_DIR}")
+MESSAGE(STATUS "  VTK_PY_WRAPPERS_DIRECTORIES=${VTK_PY_WRAPPERS_DIRECTORIES}")
+
+FOREACH(X ${VTK_PY_WRAPPERS_DIRECTORIES})
+    IF(EXISTS "${X}/site-packages/vtk")
+      SET(VTK_PY_WRAPPERS_DIR "${X}")
+    ENDIF()
+ENDFOREACH(X)
+ 
 
 IF(EXISTS ${VTK_PY_WRAPPERS_DIR}/site-packages/vtk)
     MESSAGE(STATUS "Found VTK Python Wrappers - ${VTK_PY_WRAPPERS_DIR}")