diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2017-12-05 17:36:53 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2017-12-05 17:36:53 +0000 |
| commit | a27b9df80eb077f0a72862eda9c59962cdbcabe4 (patch) | |
| tree | 379153ea2f8c29c0fdfa2b42b7da0bff3add525c /Graphics/GraphicsEngineD3D12 | |
| parent | CMake: Added grouping of projects in VS solution (diff) | |
| download | DiligentCore-a27b9df80eb077f0a72862eda9c59962cdbcabe4.tar.gz DiligentCore-a27b9df80eb077f0a72862eda9c59962cdbcabe4.zip | |
Updated cmake files
Diffstat (limited to 'Graphics/GraphicsEngineD3D12')
| -rw-r--r-- | Graphics/GraphicsEngineD3D12/CMakeLists.txt | 57 |
1 files changed, 41 insertions, 16 deletions
diff --git a/Graphics/GraphicsEngineD3D12/CMakeLists.txt b/Graphics/GraphicsEngineD3D12/CMakeLists.txt index c613170e..a801eb84 100644 --- a/Graphics/GraphicsEngineD3D12/CMakeLists.txt +++ b/Graphics/GraphicsEngineD3D12/CMakeLists.txt @@ -78,14 +78,30 @@ set(SRC src/TextureViewD3D12Impl.cpp ) +set(SHADERS + shaders/GenerateMips/GenerateMipsGammaCS.hlsl + shaders/GenerateMips/GenerateMipsGammaOddCS.hlsl + shaders/GenerateMips/GenerateMipsGammaOddXCS.hlsl + shaders/GenerateMips/GenerateMipsGammaOddYCS.hlsl + shaders/GenerateMips/GenerateMipsLinearCS.hlsl + shaders/GenerateMips/GenerateMipsLinearOddCS.hlsl + shaders/GenerateMips/GenerateMipsLinearOddXCS.hlsl + shaders/GenerateMips/GenerateMipsLinearOddYCS.hlsl +) + + add_library(GraphicsEngineD3D12-static STATIC - ${SRC} ${INTERFACE} ${INCLUDE} + ${SRC} ${INTERFACE} ${INCLUDE} ${SHADERS} + readme.md + shaders/GenerateMips/GenerateMipsCS.hlsli ) add_library(GraphicsEngineD3D12-shared SHARED - ${SRC} ${INTERFACE} ${INCLUDE} + ${SRC} ${INTERFACE} ${INCLUDE} ${SHADERS} src/DLLMain.cpp src/GraphicsEngineD3D12.def + readme.md + shaders/GenerateMips/GenerateMipsCS.hlsli ) target_include_directories(GraphicsEngineD3D12-static @@ -112,19 +128,11 @@ if(NOT FXC) message(FATAL_ERROR "Cannot find fxc!") endif(NOT FXC) -set(SHADERS - shaders/GenerateMips/GenerateMipsGammaCS.hlsl - shaders/GenerateMips/GenerateMipsGammaOddCS.hlsl - shaders/GenerateMips/GenerateMipsGammaOddXCS.hlsl - shaders/GenerateMips/GenerateMipsGammaOddYCS.hlsl - shaders/GenerateMips/GenerateMipsLinearCS.hlsl - shaders/GenerateMips/GenerateMipsLinearOddCS.hlsl - shaders/GenerateMips/GenerateMipsLinearOddXCS.hlsl - shaders/GenerateMips/GenerateMipsLinearOddYCS.hlsl -) - # Create custom target to compile shaders, which GraphicsEngineD3D12-static/shared will depend on -add_custom_target(GenerateMipsShaders ) +add_custom_target(GenerateMipsShaders +SOURCES + shaders/GenerateMips/GenerateMipsCS.hlsli +) set(SHADER_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/GenerateMips) file(MAKE_DIRECTORY ${SHADER_OUTPUT_DIR}) @@ -173,13 +181,19 @@ set_target_properties(GraphicsEngineD3D12-shared PROPERTIES source_group("src" FILES ${SRC} +) + +source_group("dll" FILES src/DLLMain.cpp src/GraphicsEngineD3D12.def ) source_group("include" FILES ${INCLUDE}) source_group("interface" FILES ${INTERFACE}) -source_group("shaders/GenerateMips" FILES ${SHADERS}) +source_group("shaders" FILES + ${SHADERS} + shaders/GenerateMips/GenerateMipsCS.hlsli +) set_target_properties(GraphicsEngineD3D12-static PROPERTIES FOLDER Core/Graphics @@ -189,4 +203,15 @@ set_target_properties(GraphicsEngineD3D12-shared PROPERTIES ) set_target_properties(GenerateMipsShaders PROPERTIES FOLDER Core/Graphics/Helper -)
\ No newline at end of file +) + +set_source_files_properties( + readme.md PROPERTIES HEADER_FILE_ONLY TRUE +) + +foreach(FILE ${SHADERS}) + set_source_files_properties( + ${FILE} PROPERTIES HEADER_FILE_ONLY TRUE + ) +endforeach(FILE) + |
