CMakeLists.txt 1.2 KB
Newer Older
1
2
include(vtkQt)

Ben Boeckel's avatar
Ben Boeckel committed
3
4
vtk_add_test_cxx(${vtk-module}CxxTests tests
  NO_VALID
5
  TestQtDebugLeaksView.cxx
6
  TestQtTableModelAdapter.cxx
7
  TestQtTreeModelAdapter.cxx
8
  )
9

Dan Lipsa's avatar
Dan Lipsa committed
10
11
if(VTK_QT_VERSION VERSION_GREATER "4" AND
    VTK_RENDERING_BACKEND STREQUAL "OpenGL2")
12
13
  vtk_add_test_cxx(${vtk-module}CxxTests tests
    TestQVTKOpenGLWidget.cxx
14
    TestQVTKOpenGLWidgetWithDisabledInteractor.cxx
15
    TestQVTKOpenGLWidgetWithMSAA.cxx
16
    )
17
18
19
  vtk_add_test_cxx(${vtk-module}CxxTests tests
    NO_VALID
    TestQVTKOpenGLWidgetPicking.cxx
20
    TestQtSwapWindows.cxx
21
    )
22
23
endif()

Utkarsh Ayachit's avatar
Utkarsh Ayachit committed
24
25
26
27
28
29
30
if(NOT VTK_LEGACY_REMOVE)
  # tests use legacy QVTKWidget.
  if(WIN32)
    vtk_add_test_cxx(${vtk-module}CxxTests tests
      NO_VALID
      TestWin32QVTKWidget.cxx)
  endif()
31
32
endif()

Dan Lipsa's avatar
Dan Lipsa committed
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
if(VTK_QT_VERSION VERSION_GREATER "4")
  find_package(Qt5 COMPONENTS Widgets REQUIRED)
  include_directories(${Qt5Widgets_INCLUDE_DIRS})
  add_definitions(${Qt5Widgets_DEFINITIONS})
else()
  find_package(Qt4 REQUIRED)
  include(${QT_USE_FILE})
endif()

vtk_test_cxx_executable(${vtk-module}CxxTests tests
  QTestApp.cxx)

if(VTK_QT_VERSION VERSION_GREATER "4")
  set_target_properties(${vtk-module}CxxTests PROPERTIES
    COMPILE_FLAGS "${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")
endif()