CMakeLists.txt 1.35 KB
Newer Older
1 2 3 4
##============================================================================
##  Copyright (c) Kitware, Inc.
##  All rights reserved.
##  See LICENSE.txt for details.
5
##
6 7 8 9 10 11 12
##  This software is distributed WITHOUT ANY WARRANTY; without even
##  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
##  PURPOSE.  See the above copyright notice for more information.
##============================================================================

set(headers
  TestingOpenGLInterop.h
13
  TestingTransferFancyHandles.h
14
  )
15
vtkm_declare_headers(${headers})
16 17 18 19


if(NOT TARGET GLUT::GLUT)
  find_package(GLUT QUIET)
20

21 22 23 24
  if(NOT TARGET GLUT::GLUT)
    return()
  endif()
endif()
25

26
# rendering can only have a single backend so we need to
27
if(VTKm_ENABLE_OSMESA_CONTEXT AND TARGET vtkm_rendering)
28 29
  list(APPEND unit_tests
    UnitTestTransferOSMesa.cxx
30
    UnitTestFancyTransferOSMesa.cxx
31
  )
32
elseif(VTKm_ENABLE_EGL_CONTEXT AND TARGET vtkm_rendering)
33 34
  list(APPEND unit_tests
    UnitTestTransferEGL.cxx
35
    UnitTestFancyTransferEGL.cxx
36
  )
37
elseif(VTKm_ENABLE_GL_CONTEXT AND TARGET vtkm_rendering)
38 39 40 41
  list(APPEND unit_tests
     UnitTestTransferGLUT.cxx
     UnitTestFancyTransferGLUT.cxx
  )
42
endif()
43

44
if(unit_tests)
45 46 47 48
  vtkm_unit_tests(SOURCES ${unit_tests}
                  LIBRARIES vtkm_rendering GLUT::GLUT
                  DEFINES VTKM_NO_ERROR_ON_MIXED_CUDA_CXX_TAG)

49
endif()