-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpremake5.lua
More file actions
88 lines (61 loc) · 1.68 KB
/
premake5.lua
File metadata and controls
88 lines (61 loc) · 1.68 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
-- defines our entire workspace as our solution in VS
workspace "DX11Basics"
architecture "x64"
configurations {
"Debug",
"Release",
"Dist"
}
startproject "DX11Basics"
-- Defines the main output dir for files
outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
project "DX11Basics"
location "DX11Basics"
kind "WindowedApp"
language "C++"
cppdialect "C++latest"
staticruntime "on"
targetdir ("bin/" .. outputdir .. "/%{prj.name}")
objdir ("bin-int/" .. outputdir .. "/%{prj.name}")
files {
"%{prj.name}/src/**.h",
"%{prj.name}/src/**.cpp",
"%{prj.name}/src/**.inl",
"%{prj.name}/shaders/**.hlsl"
}
includedirs {
"%{prj.name}/src/**",
}
shadermodel("5.0")
shaderassembler("AssemblyCode")
local shader_dir = "shaders/"
-- HLSL files that don't end with 'Extensions' will be ignored as they will be
-- used as includes
filter("files:**.hlsl")
flags("ExcludeFromBuild")
shaderobjectfileoutput(shader_dir.."%{file.basename}"..".cso")
shaderassembleroutput(shader_dir.."%{file.basename}"..".asm")
filter("files:**_ps.hlsl")
removeflags("ExcludeFromBuild")
shadertype("Pixel")
filter("files:**_vs.hlsl")
removeflags("ExcludeFromBuild")
shadertype("Vertex")
-- Warnings as errors
shaderoptions({"/WX"})
filter "system:windows"
systemversion "latest"
characterset("MBCS")
floatingpoint "Fast"
filter "configurations:Debug"
defines {"IS_DEBUG=true" }
runtime "Debug"
symbols "on"
optimize "Debug"
filter "configurations:Release"
defines {"IS_DEBUG=false", "NDEBUG"}
runtime "Release"
optimize "Speed"
filter "configurations:Dist"
runtime "Release"
optimize "Speed"