-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
30 lines (27 loc) · 992 Bytes
/
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
cmake_minimum_required(VERSION 3.10)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED true)
set(CMAKE_SUPPRESS_REGENERATION true)
project(LevelRenderer)
ADD_DEFINITIONS(-DUNICODE)
ADD_DEFINITIONS(-D_UNICODE)
ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS)
if (WIN32)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MD")
file(GLOB_RECURSE SRCS *.cpp)
file(GLOB_RECURSE HDRS *.h)
file(GLOB_RECURSE SHDRS *.hlsl *.glsl)
add_executable(LevelRenderer ${SRCS} ${HDRS} ${SHDRS})
target_include_directories(LevelRenderer PUBLIC $ENV{VULKAN_SDK}/Include/)
target_link_directories(LevelRenderer PUBLIC $ENV{VULKAN_SDK}/Lib/)
set_source_files_properties(${SHDRS} PROPERTIES
VS_SHADER_TYPE Vertex
VS_SHADER_MODEL 5.0
VS_SHADER_ENTRYPOINT VS
VS_TOOL_OVERRIDE "None")
set_source_files_properties(${SHDRS} PROPERTIES
VS_SHADER_TYPE Pixel
VS_SHADER_MODEL 5.0
VS_SHADER_ENTRYPOINT PS
VS_TOOL_OVERRIDE "None")
endif(WIN32)