-
-
Notifications
You must be signed in to change notification settings - Fork 54
/
CMakeLists.txt
48 lines (38 loc) · 1.1 KB
/
CMakeLists.txt
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
include(MethaneApplications)
include(MethaneShaders)
set(SIMPLE_VARIANT Simple)
set(UNIFORMS_VARIANT Uniforms)
foreach(VARIANT ${SIMPLE_VARIANT} ${UNIFORMS_VARIANT})
set(TARGET "MethaneHelloCube${VARIANT}")
add_methane_application(
TARGET ${TARGET}
NAME "Methane Hello Cube ${VARIANT}"
DESCRIPTION "Tutorial demonstrating colored rotating cube rendering with Methane Kit."
INSTALL_DIR "Apps"
SOURCES
HelloCubeApp.cpp
)
if(VARIANT STREQUAL "${UNIFORMS_VARIANT}")
set(VERTEX_SHADER_DEFINES ":UNIFORMS_ENABLED")
target_compile_definitions(${TARGET}
PRIVATE UNIFORMS_ENABLED
)
endif()
add_methane_shaders_source(
TARGET ${TARGET}
SOURCE Shaders/HelloCube.hlsl
VERSION 6_0
TYPES
vert=CubeVS${VERTEX_SHADER_DEFINES}
frag=CubePS
)
add_methane_shaders_library(${TARGET})
target_link_libraries(${TARGET}
PRIVATE
MethaneAppsCommon
)
set_target_properties(${TARGET}
PROPERTIES
FOLDER Apps
)
endforeach()