Kaynağa Gözat

COMP: for some reason find_package(PythonInterp) was failing when called from within the CTK-Configure target, but succeeds when called during the top level superbuild configure. This fix is better anyway, since if python is not found the error comes when running cmake rather than when running the build itself

Steve Pieper 15 yıl önce
ebeveyn
işleme
6cc57ba572
1 değiştirilmiş dosya ile 4 ekleme ve 0 silme
  1. 4 0
      CMakeLists.txt

+ 4 - 0
CMakeLists.txt

@@ -379,6 +379,10 @@ ENDFOREACH()
 #-----------------------------------------------------------------------------
 # CTK Python wrapping - Propose the option only if CTK_LIB_Scriping/Python/Core is ON
 IF(CTK_LIB_Scripting/Python/Core)
+  find_package(PythonInterp)
+  IF(NOT PYTHONINTERP_FOUND)
+    MESSAGE(SEND_ERROR "PYTHON_EXECUTABLE not specified or inexistent when CTK_LIB_Scripting is enabled")
+  ENDIF()
   OPTION(CTK_WRAP_PYTHONQT_FULL "Wrap CTK classes using Qt meta-object system into Python language" OFF)
   OPTION(CTK_WRAP_PYTHONQT_LIGHT "Wrap CTK classes using Qt meta-object system into Python language" OFF)
   IF(CTK_WRAP_PYTHONQT_FULL AND CTK_WRAP_PYTHONQT_LIGHT)