CMakeLists.txt 1.19 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Load up the CMake variables we need.
vtk_module_impl()
vtk_module_config(${vtk-module} ${${vtk-module}_DEPENDS})

# Add our test executables.
add_executable(TimingTests MACOSX_BUNDLE TimingTests.cxx vtkRenderTimings.cxx)
target_link_libraries(TimingTests ${${vtk-module}_LIBRARIES})
set_source_files_properties(TimingTests.cxx APPEND PROPERTIES
  COMPILE_DEFINITIONS "${${vtk-module}_DEFINITIONS}")
if(VTK_RENDERING_BACKEND STREQUAL "OpenGL2")
  set(compile_defs VTK_OPENGL2)
endif()
if(TARGET vtkDomainsChemistry)
  if(VTK_RENDERING_BACKEND STREQUAL "OpenGL2")
    set(extra_deps vtkDomainsChemistryOpenGL2)
  else()
    set(extra_deps vtkDomainsChemistry)
  endif()
  list(APPEND compile_defs HAVE_CHEMISTRY)
  include_directories(${VTK_SOURCE_DIR}/Domains/Chemistry
    ${VTK_BINARY_DIR}/Domains/Chemistry)
endif()
set_source_files_properties(TimingTests.cxx APPEND PROPERTIES
  COMPILE_DEFINITIONS "${compile_defs}")
target_link_libraries(TimingTests ${extra_deps})

add_executable(GLBenchmarking MACOSX_BUNDLE GLBenchmarking.cxx)
target_link_libraries(GLBenchmarking ${${vtk-module}_LIBRARIES})
set_source_files_properties(GLBenchmarking.cxx APPEND PROPERTIES
  COMPILE_DEFINITIONS "${${vtk-module}_DEFINITIONS}")