forked from Kitware/VTK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
134 lines (123 loc) · 4.39 KB
/
CMakeLists.txt
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
include(vtkObjectFactory)
set(Module_SRCS
vtkOpenGLHAVSVolumeMapper.cxx
vtkOpenGLProjectedAAHexahedraMapper.cxx
vtkOpenGLProjectedTetrahedraMapper.cxx
vtkOpenGLRayCastImageDisplayHelper.cxx
vtkOpenGLVolumeTextureMapper2D.cxx
vtkOpenGLVolumeTextureMapper3D.cxx
vtkSmartVolumeMapper.cxx
)
if (NOT Module_vtkRenderingVolumeOpenGLNew)
list(APPEND Module_SRCS vtkOpenGLGPUVolumeRayCastMapper.cxx)
endif()
set(shader_files
vtkGPUVolumeRayCastMapper_AdditiveFS.glsl
vtkGPUVolumeRayCastMapper_AdditiveCroppingFS.glsl
vtkGPUVolumeRayCastMapper_AdditiveNoCroppingFS.glsl
vtkGPUVolumeRayCastMapper_CompositeFS.glsl
vtkGPUVolumeRayCastMapper_CompositeMaskFS.glsl
vtkGPUVolumeRayCastMapper_CompositeBinaryMaskFS.glsl
vtkGPUVolumeRayCastMapper_CompositeCroppingFS.glsl
vtkGPUVolumeRayCastMapper_CompositeNoCroppingFS.glsl
vtkGPUVolumeRayCastMapper_HeaderFS.glsl
vtkGPUVolumeRayCastMapper_MIPCroppingFS.glsl
vtkGPUVolumeRayCastMapper_MIPFS.glsl
vtkGPUVolumeRayCastMapper_MIPBinaryMaskFS.glsl
vtkGPUVolumeRayCastMapper_MIPFourDependentFS.glsl
vtkGPUVolumeRayCastMapper_MIPFourDependentCroppingFS.glsl
vtkGPUVolumeRayCastMapper_MIPFourDependentNoCroppingFS.glsl
vtkGPUVolumeRayCastMapper_MIPNoCroppingFS.glsl
vtkGPUVolumeRayCastMapper_MinIPCroppingFS.glsl
vtkGPUVolumeRayCastMapper_MinIPFS.glsl
vtkGPUVolumeRayCastMapper_MinIPBinaryMaskFS.glsl
vtkGPUVolumeRayCastMapper_MinIPFourDependentFS.glsl
vtkGPUVolumeRayCastMapper_MinIPFourDependentCroppingFS.glsl
vtkGPUVolumeRayCastMapper_MinIPFourDependentNoCroppingFS.glsl
vtkGPUVolumeRayCastMapper_MinIPNoCroppingFS.glsl
vtkGPUVolumeRayCastMapper_ParallelProjectionFS.glsl
vtkGPUVolumeRayCastMapper_PerspectiveProjectionFS.glsl
vtkGPUVolumeRayCastMapper_ScaleBiasFS.glsl
vtkGPUVolumeRayCastMapper_OneComponentFS.glsl
vtkGPUVolumeRayCastMapper_FourComponentsFS.glsl
vtkGPUVolumeRayCastMapper_NoShadeFS.glsl
vtkGPUVolumeRayCastMapper_ShadeFS.glsl
vtkHAVSVolumeMapper_kbufferVP.asm
vtkHAVSVolumeMapper_k2FP.asm
vtkHAVSVolumeMapper_k2BeginFP.asm
vtkHAVSVolumeMapper_k2EndFP.asm
vtkHAVSVolumeMapper_k6FP.asm
vtkHAVSVolumeMapper_k6BeginFP.asm
vtkHAVSVolumeMapper_k6EndFP.asm
vtkProjectedAAHexahedraMapper_VS.glsl
vtkProjectedAAHexahedraMapper_GS.glsl
vtkProjectedAAHexahedraMapper_FS.glsl
vtkVolumeTextureMapper3D_FourDependentNoShadeFP.asm
vtkVolumeTextureMapper3D_FourDependentShadeFP.asm
vtkVolumeTextureMapper3D_OneComponentNoShadeFP.asm
vtkVolumeTextureMapper3D_OneComponentShadeFP.asm
vtkVolumeTextureMapper3D_TwoDependentNoShadeFP.asm
vtkVolumeTextureMapper3D_TwoDependentShadeFP.asm
)
unset(shader_h_files)
foreach(file ${shader_files})
get_filename_component(file_we ${file} NAME_WE)
set(src ${CMAKE_CURRENT_SOURCE_DIR}/${file})
set(res ${CMAKE_CURRENT_BINARY_DIR}/${file_we}.cxx)
set(resh ${CMAKE_CURRENT_BINARY_DIR}/${file_we}.h)
list(APPEND shader_h_files ${resh})
add_custom_command(
OUTPUT ${res} ${resh}
DEPENDS ${src} vtkEncodeString
COMMAND vtkEncodeString
ARGS ${res} ${src} ${file_we}
--build-header VTKRENDERINGVOLUMEOPENGL_EXPORT vtkRenderingVolumeOpenGLModule.h
)
list(APPEND Module_SRCS ${res})
set_source_files_properties(${file_we}
PROPERTIES
WRAP_EXCLUDE 1
WRAP_EXCLUDE_PYTHON 1
)
endforeach()
if (VTK_LEGACY_REMOVE)
set_source_files_properties(
vtkOpenGLVolumeTextureMapper2D.h
vtkOpenGLVolumeTextureMapper2D.cxx
vtkOpenGLVolumeTextureMapper3D.h
vtkOpenGLVolumeTextureMapper3D.cxx
PROPERTIES
WRAP_EXCLUDE 1
WRAP_EXCLUDE_PYTHON 1
)
endif()
# Nwo for the object factory.
set(opengl_overrides
HAVSVolumeMapper
ProjectedAAHexahedraMapper
ProjectedTetrahedraMapper
RayCastImageDisplayHelper
)
if (NOT VTK_LEGACY_REMOVE)
list (APPEND opengl_overrides
VolumeTextureMapper2D
VolumeTextureMapper3D)
endif()
if(NOT Module_vtkRenderingVolumeOpenGLNew)
list(APPEND opengl_overrides GPUVolumeRayCastMapper)
endif()
foreach(_override ${opengl_overrides})
vtk_add_override(vtk${_override} vtkOpenGL${_override})
endforeach()
vtk_object_factory_configure("${vtk_module_overrides}")
list(APPEND Module_SRCS
${CMAKE_CURRENT_BINARY_DIR}/${vtk-module}ObjectFactory.cxx)
set_source_files_properties(
${vtk-module}ObjectFactory.cxx
PROPERTIES
WRAP_EXCLUDE 1
WRAP_EXCLUDE_PYTHON 1
)
vtk_module_library(vtkRenderingVolumeOpenGL ${Module_SRCS})
include(vtkOpenGL)
vtk_opengl_link(vtkRenderingVolumeOpenGL)