Selaa lähdekoodia

BUG: In ctkMacroWrapPythonQt, update path with python library path to make sure python executable works properly.

When python executable isn't in the path, it's critical to make sure python
library can be found.
Jean-Christophe Fillion-Robin 14 vuotta sitten
vanhempi
commit
a4465c7f3a
1 muutettua tiedostoa jossa 5 lisäystä ja 4 poistoa
  1. 5 4
      CMake/ctkMacroWrapPythonQt.cmake

+ 5 - 4
CMake/ctkMacroWrapPythonQt.cmake

@@ -69,10 +69,11 @@ ENDFUNCTION()
 #
 FUNCTION(ctkMacroWrapPythonQt_reSearchFile python_exe python_library_path regex file is_matching)
 
-  set(python_cmd "import re\; f = open('${file}', 'r')\;
-res = re.search\(\"${regex}\", f.read(), re.MULTILINE\)\;
-if res == None: print \"FALSE\"
-else: print \"TRUE\"
+  set(python_cmd "import re
+f = open('${file}', 'r')
+res = re.search('${regex}', f.read(), re.MULTILINE)
+if res == None: print 'FALSE'
+else: print 'TRUE'
 ")
   #message("python_cmd: ${python_cmd}")