TestFramework.cmake 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. # Root
  2. set(TEST_FRAMEWORK_ROOT ${PHYSICS_REPO_ROOT}/TestFramework)
  3. # Source files
  4. set(TEST_FRAMEWORK_SRC_FILES
  5. ${TEST_FRAMEWORK_ROOT}/Application/Application.cpp
  6. ${TEST_FRAMEWORK_ROOT}/Application/Application.h
  7. ${TEST_FRAMEWORK_ROOT}/Application/DebugUI.cpp
  8. ${TEST_FRAMEWORK_ROOT}/Application/DebugUI.h
  9. ${TEST_FRAMEWORK_ROOT}/Application/EntryPoint.h
  10. ${TEST_FRAMEWORK_ROOT}/Image/BlitSurface.cpp
  11. ${TEST_FRAMEWORK_ROOT}/Image/BlitSurface.h
  12. ${TEST_FRAMEWORK_ROOT}/Image/LoadBMP.cpp
  13. ${TEST_FRAMEWORK_ROOT}/Image/LoadBMP.h
  14. ${TEST_FRAMEWORK_ROOT}/Image/LoadTGA.cpp
  15. ${TEST_FRAMEWORK_ROOT}/Image/LoadTGA.h
  16. ${TEST_FRAMEWORK_ROOT}/Image/Surface.cpp
  17. ${TEST_FRAMEWORK_ROOT}/Image/Surface.h
  18. ${TEST_FRAMEWORK_ROOT}/Image/ZoomImage.cpp
  19. ${TEST_FRAMEWORK_ROOT}/Image/ZoomImage.h
  20. ${TEST_FRAMEWORK_ROOT}/Input/Keyboard.cpp
  21. ${TEST_FRAMEWORK_ROOT}/Input/Keyboard.h
  22. ${TEST_FRAMEWORK_ROOT}/Input/Mouse.cpp
  23. ${TEST_FRAMEWORK_ROOT}/Input/Mouse.h
  24. ${TEST_FRAMEWORK_ROOT}/Math/Perlin.cpp
  25. ${TEST_FRAMEWORK_ROOT}/Math/Perlin.h
  26. ${TEST_FRAMEWORK_ROOT}/Renderer/ConstantBuffer.cpp
  27. ${TEST_FRAMEWORK_ROOT}/Renderer/ConstantBuffer.h
  28. ${TEST_FRAMEWORK_ROOT}/Renderer/CommandQueue.h
  29. ${TEST_FRAMEWORK_ROOT}/Renderer/DescriptorHeap.h
  30. ${TEST_FRAMEWORK_ROOT}/Renderer/FatalErrorIfFailed.cpp
  31. ${TEST_FRAMEWORK_ROOT}/Renderer/FatalErrorIfFailed.h
  32. ${TEST_FRAMEWORK_ROOT}/Renderer/Font.cpp
  33. ${TEST_FRAMEWORK_ROOT}/Renderer/Font.h
  34. ${TEST_FRAMEWORK_ROOT}/Renderer/Frustum.h
  35. ${TEST_FRAMEWORK_ROOT}/Renderer/PipelineState.cpp
  36. ${TEST_FRAMEWORK_ROOT}/Renderer/PipelineState.h
  37. ${TEST_FRAMEWORK_ROOT}/Renderer/Renderer.cpp
  38. ${TEST_FRAMEWORK_ROOT}/Renderer/Renderer.h
  39. ${TEST_FRAMEWORK_ROOT}/Renderer/RenderInstances.cpp
  40. ${TEST_FRAMEWORK_ROOT}/Renderer/RenderInstances.h
  41. ${TEST_FRAMEWORK_ROOT}/Renderer/RenderPrimitive.cpp
  42. ${TEST_FRAMEWORK_ROOT}/Renderer/RenderPrimitive.h
  43. ${TEST_FRAMEWORK_ROOT}/Renderer/Texture.cpp
  44. ${TEST_FRAMEWORK_ROOT}/Renderer/Texture.h
  45. ${TEST_FRAMEWORK_ROOT}/Renderer/DebugRendererImp.cpp
  46. ${TEST_FRAMEWORK_ROOT}/Renderer/DebugRendererImp.h
  47. ${TEST_FRAMEWORK_ROOT}/TestFramework.cmake
  48. ${TEST_FRAMEWORK_ROOT}/TestFramework.h
  49. ${TEST_FRAMEWORK_ROOT}/UI/UIAnimation.cpp
  50. ${TEST_FRAMEWORK_ROOT}/UI/UIAnimation.h
  51. ${TEST_FRAMEWORK_ROOT}/UI/UIAnimationSlide.cpp
  52. ${TEST_FRAMEWORK_ROOT}/UI/UIAnimationSlide.h
  53. ${TEST_FRAMEWORK_ROOT}/UI/UIButton.cpp
  54. ${TEST_FRAMEWORK_ROOT}/UI/UIButton.h
  55. ${TEST_FRAMEWORK_ROOT}/UI/UICheckBox.cpp
  56. ${TEST_FRAMEWORK_ROOT}/UI/UICheckBox.h
  57. ${TEST_FRAMEWORK_ROOT}/UI/UIComboBox.cpp
  58. ${TEST_FRAMEWORK_ROOT}/UI/UIComboBox.h
  59. ${TEST_FRAMEWORK_ROOT}/UI/UIElement.cpp
  60. ${TEST_FRAMEWORK_ROOT}/UI/UIElement.h
  61. ${TEST_FRAMEWORK_ROOT}/UI/UIEventListener.h
  62. ${TEST_FRAMEWORK_ROOT}/UI/UIHorizontalStack.cpp
  63. ${TEST_FRAMEWORK_ROOT}/UI/UIHorizontalStack.h
  64. ${TEST_FRAMEWORK_ROOT}/UI/UIImage.cpp
  65. ${TEST_FRAMEWORK_ROOT}/UI/UIImage.h
  66. ${TEST_FRAMEWORK_ROOT}/UI/UIManager.cpp
  67. ${TEST_FRAMEWORK_ROOT}/UI/UIManager.h
  68. ${TEST_FRAMEWORK_ROOT}/UI/UISlider.cpp
  69. ${TEST_FRAMEWORK_ROOT}/UI/UISlider.h
  70. ${TEST_FRAMEWORK_ROOT}/UI/UIStaticText.cpp
  71. ${TEST_FRAMEWORK_ROOT}/UI/UIStaticText.h
  72. ${TEST_FRAMEWORK_ROOT}/UI/UITextButton.cpp
  73. ${TEST_FRAMEWORK_ROOT}/UI/UITextButton.h
  74. ${TEST_FRAMEWORK_ROOT}/UI/UITexturedQuad.h
  75. ${TEST_FRAMEWORK_ROOT}/UI/UIVerticalStack.cpp
  76. ${TEST_FRAMEWORK_ROOT}/UI/UIVerticalStack.h
  77. ${TEST_FRAMEWORK_ROOT}/Utils/CustomMemoryHook.cpp
  78. ${TEST_FRAMEWORK_ROOT}/Utils/CustomMemoryHook.h
  79. ${TEST_FRAMEWORK_ROOT}/Utils/Log.cpp
  80. ${TEST_FRAMEWORK_ROOT}/Utils/Log.h
  81. ${TEST_FRAMEWORK_ROOT}/Utils/ReadData.cpp
  82. ${TEST_FRAMEWORK_ROOT}/Utils/ReadData.h
  83. )
  84. # Group source files
  85. source_group(TREE ${TEST_FRAMEWORK_ROOT} FILES ${TEST_FRAMEWORK_SRC_FILES})
  86. # All shaders
  87. set(TEST_FRAMEWORK_SRC_FILES_SHADERS
  88. ${PHYSICS_REPO_ROOT}/Assets/Shaders/VertexConstants.h
  89. )
  90. # Vertex shaders
  91. set(TEST_FRAMEWORK_VERTEX_SHADERS
  92. ${PHYSICS_REPO_ROOT}/Assets/Shaders/FontVertexShader.hlsl
  93. ${PHYSICS_REPO_ROOT}/Assets/Shaders/LineVertexShader.hlsl
  94. ${PHYSICS_REPO_ROOT}/Assets/Shaders/TriangleDepthVertexShader.hlsl
  95. ${PHYSICS_REPO_ROOT}/Assets/Shaders/TriangleVertexShader.hlsl
  96. ${PHYSICS_REPO_ROOT}/Assets/Shaders/UIVertexShader.hlsl
  97. )
  98. set(TEST_FRAMEWORK_SRC_FILES_SHADERS ${TEST_FRAMEWORK_SRC_FILES_SHADERS} ${TEST_FRAMEWORK_VERTEX_SHADERS})
  99. set_source_files_properties(${TEST_FRAMEWORK_VERTEX_SHADERS} PROPERTIES VS_SHADER_FLAGS "/WX /T vs_5_0")
  100. # Pixel shaders
  101. set(TEST_FRAMEWORK_PIXEL_SHADERS
  102. ${PHYSICS_REPO_ROOT}/Assets/Shaders/FontPixelShader.hlsl
  103. ${PHYSICS_REPO_ROOT}/Assets/Shaders/LinePixelShader.hlsl
  104. ${PHYSICS_REPO_ROOT}/Assets/Shaders/TriangleDepthPixelShader.hlsl
  105. ${PHYSICS_REPO_ROOT}/Assets/Shaders/TrianglePixelShader.hlsl
  106. ${PHYSICS_REPO_ROOT}/Assets/Shaders/UIPixelShader.hlsl
  107. ${PHYSICS_REPO_ROOT}/Assets/Shaders/UIPixelShaderUntextured.hlsl
  108. )
  109. set(TEST_FRAMEWORK_SRC_FILES_SHADERS ${TEST_FRAMEWORK_SRC_FILES_SHADERS} ${TEST_FRAMEWORK_PIXEL_SHADERS})
  110. set_source_files_properties(${TEST_FRAMEWORK_PIXEL_SHADERS} PROPERTIES VS_SHADER_FLAGS "/WX /T ps_5_0")
  111. # Group shader files
  112. source_group(TREE ${PHYSICS_REPO_ROOT} FILES ${TEST_FRAMEWORK_SRC_FILES_SHADERS})
  113. # Create TestFramework lib
  114. add_library(TestFramework STATIC ${TEST_FRAMEWORK_SRC_FILES} ${TEST_FRAMEWORK_SRC_FILES_SHADERS})
  115. target_include_directories(TestFramework PUBLIC ${TEST_FRAMEWORK_ROOT})
  116. target_link_libraries(TestFramework LINK_PUBLIC Jolt dxguid.lib dinput8.lib dxgi.lib d3d12.lib d3dcompiler.lib)
  117. target_precompile_headers(TestFramework PUBLIC ${TEST_FRAMEWORK_ROOT}/TestFramework.h)