summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/CMakeLists.txt
blob: 69a0968e4d883105ae108ffb3466bbf2d72cc91e (plain)
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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
add_library(videocommon
  AbstractFramebuffer.cpp
  AbstractFramebuffer.h
  AbstractGfx.cpp
  AbstractGfx.h
  AbstractShader.h
  AbstractStagingTexture.cpp
  AbstractStagingTexture.h
  AbstractTexture.cpp
  AbstractTexture.h
  Assets/AssetListener.h
  Assets/CustomAsset.cpp
  Assets/CustomAsset.h
  Assets/CustomAssetCache.cpp
  Assets/CustomAssetCache.h
  Assets/CustomAssetLibrary.h
  Assets/CustomAssetLoader.cpp
  Assets/CustomAssetLoader.h
  Assets/CustomTextureData.cpp
  Assets/CustomTextureData.h
  Assets/DirectFilesystemAssetLibrary.cpp
  Assets/DirectFilesystemAssetLibrary.h
  Assets/MaterialAsset.cpp
  Assets/MaterialAsset.h
  Assets/MeshAsset.cpp
  Assets/MeshAsset.h
  Assets/ShaderAsset.cpp
  Assets/ShaderAsset.h
  Assets/TextureAsset.cpp
  Assets/TextureAsset.h
  Assets/TextureAssetUtils.cpp
  Assets/TextureAssetUtils.h
  Assets/TextureSamplerValue.cpp
  Assets/TextureSamplerValue.h
  Assets/Types.h
  Assets/WatchableFilesystemAssetLibrary.h
  AsyncRequests.cpp
  AsyncRequests.h
  AsyncShaderCompiler.cpp
  AsyncShaderCompiler.h
  BoundingBox.cpp
  BoundingBox.h
  BPFunctions.cpp
  BPFunctions.h
  BPMemory.cpp
  BPMemory.h
  BPStructs.cpp
  BPStructs.h
  CommandProcessor.cpp
  CommandProcessor.h
  ConstantManager.h
  Constants.h
  CPMemory.cpp
  CPMemory.h
  CPUCull.cpp
  CPUCull.h
  CPUCullImpl.h
  DriverDetails.cpp
  DriverDetails.h
  EFBInterface.cpp
  EFBInterface.h
  Fifo.cpp
  Fifo.h
  FramebufferManager.cpp
  FramebufferManager.h
  FramebufferShaderGen.cpp
  FramebufferShaderGen.h
  FrameDumper.cpp
  FrameDumper.h
  FrameDumpFFMpeg.h
  FreeLookCamera.cpp
  FreeLookCamera.h
  GeometryShaderGen.cpp
  GeometryShaderGen.h
  GeometryShaderManager.cpp
  GeometryShaderManager.h
  GraphicsModSystem/Config/GraphicsMod.cpp
  GraphicsModSystem/Config/GraphicsMod.h
  GraphicsModSystem/Config/GraphicsModAsset.cpp
  GraphicsModSystem/Config/GraphicsModAsset.h
  GraphicsModSystem/Config/GraphicsModFeature.cpp
  GraphicsModSystem/Config/GraphicsModFeature.h
  GraphicsModSystem/Config/GraphicsModGroup.cpp
  GraphicsModSystem/Config/GraphicsModGroup.h
  GraphicsModSystem/Config/GraphicsTarget.cpp
  GraphicsModSystem/Config/GraphicsTarget.h
  GraphicsModSystem/Config/GraphicsTargetGroup.cpp
  GraphicsModSystem/Config/GraphicsTargetGroup.h
  GraphicsModSystem/Constants.h
  GraphicsModSystem/Runtime/Actions/CustomPipelineAction.cpp
  GraphicsModSystem/Runtime/Actions/CustomPipelineAction.h
  GraphicsModSystem/Runtime/Actions/MoveAction.cpp
  GraphicsModSystem/Runtime/Actions/MoveAction.h
  GraphicsModSystem/Runtime/Actions/PrintAction.cpp
  GraphicsModSystem/Runtime/Actions/PrintAction.h
  GraphicsModSystem/Runtime/Actions/ScaleAction.cpp
  GraphicsModSystem/Runtime/Actions/ScaleAction.h
  GraphicsModSystem/Runtime/Actions/SkipAction.cpp
  GraphicsModSystem/Runtime/Actions/SkipAction.h
  GraphicsModSystem/Runtime/CustomPipeline.cpp
  GraphicsModSystem/Runtime/CustomPipeline.h
  GraphicsModSystem/Runtime/CustomShaderCache.cpp
  GraphicsModSystem/Runtime/CustomShaderCache.h
  GraphicsModSystem/Runtime/FBInfo.cpp
  GraphicsModSystem/Runtime/FBInfo.h
  GraphicsModSystem/Runtime/GraphicsModAction.h
  GraphicsModSystem/Runtime/GraphicsModActionData.h
  GraphicsModSystem/Runtime/GraphicsModActionFactory.cpp
  GraphicsModSystem/Runtime/GraphicsModActionFactory.h
  GraphicsModSystem/Runtime/GraphicsModManager.cpp
  GraphicsModSystem/Runtime/GraphicsModManager.h
  HiresTextures.cpp
  HiresTextures.h
  IndexGenerator.cpp
  IndexGenerator.h
  LightingShaderGen.cpp
  LightingShaderGen.h
  LookUpTables.h
  NativeVertexFormat.h
  NetPlayChatUI.cpp
  NetPlayChatUI.h
  NetPlayGolfUI.cpp
  NetPlayGolfUI.h
  OnScreenDisplay.cpp
  OnScreenDisplay.h
  OnScreenUI.cpp
  OnScreenUI.h
  OnScreenUIKeyMap.h
  OpcodeDecoding.cpp
  OpcodeDecoding.h
  PerfQueryBase.cpp
  PerfQueryBase.h
  PerformanceMetrics.cpp
  PerformanceMetrics.h
  PerformanceTracker.cpp
  PerformanceTracker.h
  PipelineUtils.cpp
  PipelineUtils.h
  PixelEngine.cpp
  PixelEngine.h
  PixelShaderGen.cpp
  PixelShaderGen.h
  PixelShaderManager.cpp
  PixelShaderManager.h
  PostProcessing.cpp
  PostProcessing.h
  Present.cpp
  Present.h
  RenderState.cpp
  RenderState.h
  Resources/CustomResourceManager.cpp
  Resources/CustomResourceManager.h
  Resources/InvalidTextures.cpp
  Resources/InvalidTextures.h
  Resources/MaterialResource.cpp
  Resources/MaterialResource.h
  Resources/Resource.cpp
  Resources/Resource.h
  Resources/ShaderResource.cpp
  Resources/ShaderResource.h
  Resources/TextureAndSamplerResource.cpp
  Resources/TextureAndSamplerResource.h
  Resources/TextureDataResource.cpp
  Resources/TextureDataResource.h
  Resources/TexturePool.cpp
  Resources/TexturePool.h
  ShaderCache.cpp
  ShaderCache.h
  ShaderCompileUtils.cpp
  ShaderCompileUtils.h
  ShaderGenCommon.cpp
  ShaderGenCommon.h
  Spirv.cpp
  Spirv.h
  Statistics.cpp
  Statistics.h
  TextureCacheBase.cpp
  TextureCacheBase.h
  TextureConfig.cpp
  TextureConfig.h
  TextureConversionShader.cpp
  TextureConversionShader.h
  TextureConverterShaderGen.cpp
  TextureConverterShaderGen.h
  TextureDecoder.h
  TextureDecoder_Common.cpp
  TextureDecoder_Util.h
  TextureInfo.cpp
  TextureInfo.h
  TextureUtils.cpp
  TextureUtils.h
  TMEM.cpp
  TMEM.h
  UberShaderCommon.cpp
  UberShaderCommon.h
  UberShaderPixel.cpp
  UberShaderPixel.h
  UberShaderVertex.cpp
  UberShaderVertex.h
  VertexLoader.cpp
  VertexLoader.h
  VertexLoaderBase.cpp
  VertexLoaderBase.h
  VertexLoaderManager.cpp
  VertexLoaderManager.h
  VertexLoaderUtils.h
  VertexLoader_Color.cpp
  VertexLoader_Color.h
  VertexLoader_Normal.cpp
  VertexLoader_Normal.h
  VertexLoader_Position.cpp
  VertexLoader_Position.h
  VertexLoader_TextCoord.cpp
  VertexLoader_TextCoord.h
  VertexManagerBase.cpp
  VertexManagerBase.h
  VertexShaderGen.cpp
  VertexShaderGen.h
  VertexShaderManager.cpp
  VertexShaderManager.h
  VideoBackendBase.cpp
  VideoBackendBase.h
  VideoEvents.h
  VideoCommon.h
  VideoConfig.cpp
  VideoConfig.h
  VideoState.cpp
  VideoState.h
  Widescreen.cpp
  Widescreen.h
  XFMemory.cpp
  XFMemory.h
  XFStateManager.cpp
  XFStateManager.h
  XFStructs.cpp
  XFStructs.h
)

target_link_libraries(videocommon
PUBLIC
  core
  glslang::glslang
PRIVATE
  fmt::fmt
  spng::spng
  xxhash::xxhash
  imgui
  implot
  glslang::SPIRV
  tinygltf
)

if(_M_X86_64)
  target_sources(videocommon PRIVATE
    TextureDecoder_x64.cpp
    VertexLoaderX64.cpp
    VertexLoaderX64.h
  )
elseif(_M_ARM_64)
  target_sources(videocommon PRIVATE
    VertexLoaderARM64.cpp
    VertexLoaderARM64.h
    TextureDecoder_Generic.cpp
  )
else()
  target_sources(videocommon PRIVATE
    TextureDecoder_Generic.cpp
  )
endif()

if(FFmpeg_FOUND)
  target_sources(videocommon PRIVATE
    FrameDumpFFMpeg.cpp
  )
  target_link_libraries(videocommon PRIVATE
    FFmpeg::avcodec
    FFmpeg::avformat
    FFmpeg::avutil
    FFmpeg::swresample
    FFmpeg::swscale
  )
  if(APPLE)
    target_link_libraries(videocommon PRIVATE
      ${COREMEDIA_LIBRARY}
      ${VIDEOTOOLBOX_LIBRARY}
      ${COREVIDEO_LIBRARY}
      ${AUDIOTOOLBOX_LIBRARY}
    )
  endif()
endif()

if(MSVC)
  # Add precompiled header
  target_link_libraries(videocommon PRIVATE use_pch)
endif()