Просмотр исходного кода

Include python test depending on Qt bindings only when possible

Jean-Christophe Fillion-Robin лет назад: 14
Родитель
Сommit
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