CMakeLists.txt 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  1. add_library(videocommon
  2. AbstractFramebuffer.cpp
  3. AbstractFramebuffer.h
  4. AbstractGfx.cpp
  5. AbstractGfx.h
  6. AbstractShader.h
  7. AbstractStagingTexture.cpp
  8. AbstractStagingTexture.h
  9. AbstractTexture.cpp
  10. AbstractTexture.h
  11. Assets/CustomAsset.cpp
  12. Assets/CustomAsset.h
  13. Assets/CustomAssetLibrary.cpp
  14. Assets/CustomAssetLibrary.h
  15. Assets/CustomAssetLoader.cpp
  16. Assets/CustomAssetLoader.h
  17. Assets/CustomTextureData.cpp
  18. Assets/CustomTextureData.h
  19. Assets/DirectFilesystemAssetLibrary.cpp
  20. Assets/DirectFilesystemAssetLibrary.h
  21. Assets/MaterialAsset.cpp
  22. Assets/MaterialAsset.h
  23. Assets/MeshAsset.cpp
  24. Assets/MeshAsset.h
  25. Assets/ShaderAsset.cpp
  26. Assets/ShaderAsset.h
  27. Assets/TextureAsset.cpp
  28. Assets/TextureAsset.h
  29. AsyncRequests.cpp
  30. AsyncRequests.h
  31. AsyncShaderCompiler.cpp
  32. AsyncShaderCompiler.h
  33. BoundingBox.cpp
  34. BoundingBox.h
  35. BPFunctions.cpp
  36. BPFunctions.h
  37. BPMemory.cpp
  38. BPMemory.h
  39. BPStructs.cpp
  40. BPStructs.h
  41. CommandProcessor.cpp
  42. CommandProcessor.h
  43. ConstantManager.h
  44. Constants.h
  45. CPMemory.cpp
  46. CPMemory.h
  47. CPUCull.cpp
  48. CPUCull.h
  49. CPUCullImpl.h
  50. DriverDetails.cpp
  51. DriverDetails.h
  52. Fifo.cpp
  53. Fifo.h
  54. FramebufferManager.cpp
  55. FramebufferManager.h
  56. FramebufferShaderGen.cpp
  57. FramebufferShaderGen.h
  58. FrameDumper.cpp
  59. FrameDumper.h
  60. FrameDumpFFMpeg.h
  61. FreeLookCamera.cpp
  62. FreeLookCamera.h
  63. GeometryShaderGen.cpp
  64. GeometryShaderGen.h
  65. GeometryShaderManager.cpp
  66. GeometryShaderManager.h
  67. GraphicsModSystem/Config/GraphicsMod.cpp
  68. GraphicsModSystem/Config/GraphicsMod.h
  69. GraphicsModSystem/Config/GraphicsModAsset.cpp
  70. GraphicsModSystem/Config/GraphicsModAsset.h
  71. GraphicsModSystem/Config/GraphicsModFeature.cpp
  72. GraphicsModSystem/Config/GraphicsModFeature.h
  73. GraphicsModSystem/Config/GraphicsModGroup.cpp
  74. GraphicsModSystem/Config/GraphicsModGroup.h
  75. GraphicsModSystem/Config/GraphicsTarget.cpp
  76. GraphicsModSystem/Config/GraphicsTarget.h
  77. GraphicsModSystem/Config/GraphicsTargetGroup.cpp
  78. GraphicsModSystem/Config/GraphicsTargetGroup.h
  79. GraphicsModSystem/Constants.h
  80. GraphicsModSystem/Runtime/Actions/CustomPipelineAction.cpp
  81. GraphicsModSystem/Runtime/Actions/CustomPipelineAction.h
  82. GraphicsModSystem/Runtime/Actions/MoveAction.cpp
  83. GraphicsModSystem/Runtime/Actions/MoveAction.h
  84. GraphicsModSystem/Runtime/Actions/PrintAction.cpp
  85. GraphicsModSystem/Runtime/Actions/PrintAction.h
  86. GraphicsModSystem/Runtime/Actions/ScaleAction.cpp
  87. GraphicsModSystem/Runtime/Actions/ScaleAction.h
  88. GraphicsModSystem/Runtime/Actions/SkipAction.cpp
  89. GraphicsModSystem/Runtime/Actions/SkipAction.h
  90. GraphicsModSystem/Runtime/CustomPipeline.cpp
  91. GraphicsModSystem/Runtime/CustomPipeline.h
  92. GraphicsModSystem/Runtime/CustomShaderCache.cpp
  93. GraphicsModSystem/Runtime/CustomShaderCache.h
  94. GraphicsModSystem/Runtime/FBInfo.cpp
  95. GraphicsModSystem/Runtime/FBInfo.h
  96. GraphicsModSystem/Runtime/GraphicsModAction.h
  97. GraphicsModSystem/Runtime/GraphicsModActionData.h
  98. GraphicsModSystem/Runtime/GraphicsModActionFactory.cpp
  99. GraphicsModSystem/Runtime/GraphicsModActionFactory.h
  100. GraphicsModSystem/Runtime/GraphicsModManager.cpp
  101. GraphicsModSystem/Runtime/GraphicsModManager.h
  102. HiresTextures.cpp
  103. HiresTextures.h
  104. IndexGenerator.cpp
  105. IndexGenerator.h
  106. LightingShaderGen.cpp
  107. LightingShaderGen.h
  108. LookUpTables.h
  109. NativeVertexFormat.h
  110. NetPlayChatUI.cpp
  111. NetPlayChatUI.h
  112. NetPlayGolfUI.cpp
  113. NetPlayGolfUI.h
  114. OnScreenDisplay.cpp
  115. OnScreenDisplay.h
  116. OnScreenUI.cpp
  117. OnScreenUI.h
  118. OnScreenUIKeyMap.h
  119. OpcodeDecoding.cpp
  120. OpcodeDecoding.h
  121. PerfQueryBase.cpp
  122. PerfQueryBase.h
  123. PerformanceMetrics.cpp
  124. PerformanceMetrics.h
  125. PerformanceTracker.cpp
  126. PerformanceTracker.h
  127. PixelEngine.cpp
  128. PixelEngine.h
  129. PixelShaderGen.cpp
  130. PixelShaderGen.h
  131. PixelShaderManager.cpp
  132. PixelShaderManager.h
  133. PostProcessing.cpp
  134. PostProcessing.h
  135. Present.cpp
  136. Present.h
  137. RenderBase.cpp
  138. RenderBase.h
  139. RenderState.cpp
  140. RenderState.h
  141. ShaderCache.cpp
  142. ShaderCache.h
  143. ShaderGenCommon.cpp
  144. ShaderGenCommon.h
  145. Spirv.cpp
  146. Spirv.h
  147. Statistics.cpp
  148. Statistics.h
  149. TextureCacheBase.cpp
  150. TextureCacheBase.h
  151. TextureConfig.cpp
  152. TextureConfig.h
  153. TextureConversionShader.cpp
  154. TextureConversionShader.h
  155. TextureConverterShaderGen.cpp
  156. TextureConverterShaderGen.h
  157. TextureDecoder.h
  158. TextureDecoder_Common.cpp
  159. TextureDecoder_Util.h
  160. TextureInfo.cpp
  161. TextureInfo.h
  162. TextureUtils.cpp
  163. TextureUtils.h
  164. TMEM.cpp
  165. TMEM.h
  166. UberShaderCommon.cpp
  167. UberShaderCommon.h
  168. UberShaderPixel.cpp
  169. UberShaderPixel.h
  170. UberShaderVertex.cpp
  171. UberShaderVertex.h
  172. VertexLoader.cpp
  173. VertexLoader.h
  174. VertexLoaderBase.cpp
  175. VertexLoaderBase.h
  176. VertexLoaderManager.cpp
  177. VertexLoaderManager.h
  178. VertexLoaderUtils.h
  179. VertexLoader_Color.cpp
  180. VertexLoader_Color.h
  181. VertexLoader_Normal.cpp
  182. VertexLoader_Normal.h
  183. VertexLoader_Position.cpp
  184. VertexLoader_Position.h
  185. VertexLoader_TextCoord.cpp
  186. VertexLoader_TextCoord.h
  187. VertexManagerBase.cpp
  188. VertexManagerBase.h
  189. VertexShaderGen.cpp
  190. VertexShaderGen.h
  191. VertexShaderManager.cpp
  192. VertexShaderManager.h
  193. VideoBackendBase.cpp
  194. VideoBackendBase.h
  195. VideoEvents.h
  196. VideoCommon.h
  197. VideoConfig.cpp
  198. VideoConfig.h
  199. VideoState.cpp
  200. VideoState.h
  201. Widescreen.cpp
  202. Widescreen.h
  203. XFMemory.cpp
  204. XFMemory.h
  205. XFStateManager.cpp
  206. XFStateManager.h
  207. XFStructs.cpp
  208. XFStructs.h
  209. )
  210. target_link_libraries(videocommon
  211. PUBLIC
  212. core
  213. PRIVATE
  214. fmt::fmt
  215. spng::spng
  216. xxhash::xxhash
  217. imgui
  218. implot
  219. glslang
  220. tinygltf
  221. )
  222. if(_M_X86_64)
  223. target_sources(videocommon PRIVATE
  224. TextureDecoder_x64.cpp
  225. VertexLoaderX64.cpp
  226. VertexLoaderX64.h
  227. )
  228. elseif(_M_ARM_64)
  229. target_sources(videocommon PRIVATE
  230. VertexLoaderARM64.cpp
  231. VertexLoaderARM64.h
  232. TextureDecoder_Generic.cpp
  233. )
  234. else()
  235. target_sources(videocommon PRIVATE
  236. TextureDecoder_Generic.cpp
  237. )
  238. endif()
  239. if(FFmpeg_FOUND)
  240. target_sources(videocommon PRIVATE
  241. FrameDumpFFMpeg.cpp
  242. )
  243. target_link_libraries(videocommon PRIVATE
  244. FFmpeg::avcodec
  245. FFmpeg::avformat
  246. FFmpeg::avutil
  247. FFmpeg::swresample
  248. FFmpeg::swscale
  249. )
  250. if(APPLE)
  251. target_link_libraries(videocommon PRIVATE
  252. ${COREMEDIA_LIBRARY}
  253. ${VIDEOTOOLBOX_LIBRARY}
  254. ${COREVIDEO_LIBRARY}
  255. ${AUDIOTOOLBOX_LIBRARY}
  256. )
  257. endif()
  258. endif()
  259. # Silence warnings on glslang by flagging it as a system include
  260. target_include_directories(videocommon
  261. SYSTEM PUBLIC
  262. ${CMAKE_SOURCE_DIR}/Externals/glslang/glslang/Public
  263. SYSTEM PRIVATE
  264. ${CMAKE_SOURCE_DIR}/Externals/glslang/StandAlone
  265. ${CMAKE_SOURCE_DIR}/Externals/glslang/SPIRV
  266. ${CMAKE_SOURCE_DIR}/Externals/glslang
  267. )
  268. if(MSVC)
  269. # Add precompiled header
  270. target_link_libraries(videocommon PRIVATE use_pch)
  271. endif()