forked from DiligentGraphics/DiligentSamples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
51 lines (38 loc) · 1.48 KB
/
CMakeLists.txt
File metadata and controls
51 lines (38 loc) · 1.48 KB
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
cmake_minimum_required (VERSION 3.6)
project(Shadows CXX)
set(SOURCE
src/ShadowsSample.cpp
)
set(INCLUDE
src/ShadowsSample.hpp
)
set(SHADERS
assets/shaders/MeshVS.vsh
assets/shaders/MeshPS.psh
../../../DiligentFX/Shaders/Common/public/BasicStructures.fxh
../../../DiligentFX/Shaders/Common/public/Shadows.fxh
)
file(GLOB POWERPLANT_FILES LIST_DIRECTORIES false assets/Powerplant/*.*)
set(ASSETS
${POWERPLANT_FILES}
)
add_sample_app("Shadows" "DiligentSamples/Samples" "${SOURCE}" "${INCLUDE}" "${SHADERS}" "${ASSETS}")
target_link_libraries(Shadows PRIVATE Diligent-AssetLoader DiligentFX)
target_include_directories(Shadows
PRIVATE
../../../DiligentFX/Shaders/Common/public/
)
add_custom_command(TARGET Shadows PRE_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${CMAKE_CURRENT_SOURCE_DIR}/../../../DiligentFX/Shaders/Common/public/BasicStructures.fxh" "${CMAKE_CURRENT_SOURCE_DIR}/assets/shaders"
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${CMAKE_CURRENT_SOURCE_DIR}/../../../DiligentFX/Shaders/Common/public/Shadows.fxh" "${CMAKE_CURRENT_SOURCE_DIR}/assets/shaders"
)
set_source_files_properties(${POWERPLANT_FILES} PROPERTIES
VS_DEPLOYMENT_LOCATION "Powerplant"
MACOSX_PACKAGE_LOCATION "Resources/Powerplant"
)
set_source_files_properties(${SHADERS} PROPERTIES
VS_DEPLOYMENT_LOCATION "shaders"
MACOSX_PACKAGE_LOCATION Resources/shaders
)
source_group("assets" FILES ${ASSETS})
source_group("assets\\shaders" FILES ${SHADERS})