Browse Source

Set sys.path with vtk package path independently of VTK build tree location

Jean-Christophe Fillion-Robin 13 years ago
parent
commit
a020ea8c44
1 changed files with 1 additions and 6 deletions
  1. 1 6
      Applications/ctkSimplePythonShell/ctkSimplePythonManager.cpp.in

+ 1 - 6
Applications/ctkSimplePythonShell/ctkSimplePythonManager.cpp.in

@@ -61,14 +61,9 @@ QStringList ctkSimplePythonManager::pythonPaths()
 #ifdef CTK_WRAP_PYTHONQT_USE_VTK
 
   // Try to put the VTK python module location in sys.path.
-  QString vtk_build_dir = "/../../CMakeExternals/Build/VTK/Wrapping/Python";
+  QString vtk_package_dir = "@VTK_DIR@/Wrapping/Python";
   bool found_vtk = false;
-  QString vtk_package_dir = self_dir;
 
-#if defined(CMAKE_INTDIR)
-  vtk_package_dir.append("/..");
-#endif
-  vtk_package_dir.append(vtk_build_dir);
   QFileInfo fi(vtk_package_dir);
   vtk_package_dir = fi.absoluteFilePath();
   if (fi.isDir())