소스 검색

Include python test depending on Qt bindings only when possible

Jean-Christophe Fillion-Robin 14 년 전
부모
커밋
4a06f92f4c
1개의 변경된 파일8개의 추가작업 그리고 2개의 파일을 삭제
  1. 8 2
      Applications/ctkSimplePythonShell/Testing/Python/CMakeLists.txt

+ 8 - 2
Applications/ctkSimplePythonShell/Testing/Python/CMakeLists.txt

@@ -2,16 +2,22 @@
 SET(KIT_TESTS ${CPP_TEST_PATH}/ctkSimplePythonShell)
 
 SET(SCRIPTS
-  derivedQWidgetTest.py
   wrappedQInvokableTest.py
   wrappedQPropertyTest.py
   wrappedSlotTest.py
   )
 
-IF(CTK_LIB_Widgets)
+# Since QTimer is part of QtCore and is used in both 'ctkWidgetsTest.py' and 'derivedQWidgetTest.py', 
+# these two tests should be included only if CTK_LIB_Scripting/Python/Core_PYTHONQT_WRAP_QTCORE is ON
+
+IF(CTK_LIB_Widgets AND CTK_LIB_Scripting/Python/Core_PYTHONQT_WRAP_QTCORE)
   LIST(APPEND SCRIPTS ctkWidgetsTest.py)
 ENDIF()
 
+IF(CTK_LIB_Scripting/Python/Core_PYTHONQT_WRAP_QTCORE AND CTK_LIB_Scripting/Python/Core_PYTHONQT_WRAP_QTGUI)
+  LIST(APPEND SCRIPTS derivedQWidgetTest.py)
+ENDIF()
+
 IF(CTK_LIB_Scripting/Python/Core_PYTHONQT_USE_VTK)
   LIST(APPEND SCRIPTS
     vtkPythonSmoke.py