-
Notifications
You must be signed in to change notification settings - Fork 1
/
premake5.lua
121 lines (77 loc) · 2.51 KB
/
premake5.lua
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
require "export_compile_commands"
--- in theory, as premake is in the same repo as this, it shouldn't be a problem
target_location = "%{wks.location}/bin/%{cfg.shortname}"
workspace "reactor"
configurations { "Debug", "Work", "Release" }
platforms { "x86", "x64" }
staticruntime "On"
systemversion "latest"
targetdir (target_location)
filter { "platforms:x64" }
architecture "x64"
filter { "platforms:x86" }
architecture "x86"
filter "system:windows"
defines { "WIN32" }
defines { "_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1"}
systemversion "latest"
filter "system:linux"
defines {
--"_GLFW_OSMESA", -- options: x11 osmesa wayland
-- osmesa compiles installs without x11 or wayland headers
"GLFW_INCLUDE_NONE", -- avoid including GL stuff
}
links { "X11", "Xrandr", "Xinerama", "Xi" , "Xcursor"} -- for x11
filter "configurations:Debug"
defines { "DEBUG" }
symbols "On"
filter "configurations:Work"
defines { "DEBUG" }
symbols "On"
optimize "On"
filter "configurations:Release"
defines { "NDEBUG" }
optimize "On"
include "deps/glfw.lua"
include "deps/slang.lua"
group ""
project "reactor"
systemversion "latest"
kind "WindowedApp"
language "C++"
warnings "Off"
pchheader "pch.h"
pchsource "src/reactor/pch.cpp"
forceincludes "pch.h"
files { "premake5.lua" }
files { "src/**.h", "src/**.cpp" }
includedirs { "src/reactor" }
includedirs { os.getenv("VULKAN_SDK") .. "/include" }
files { "deps/imgui/*.h", "deps/imgui/*.cpp" }
files { "deps/imgui/examples/imgui_impl_glfw.*", "deps/imgui/examples/imgui_impl_vulkan.*"}
includedirs { "deps/imgui" }
files { "deps/tinyobjloader/tiny_obj_loader.*" }
includedirs { "deps/tinyobjloader" }
files { "deps/stb/stb_image.h" }
files { "deps/stb/stb_image_write.h" }
includedirs { "deps/stb" }
-- files { "deps/glfw/"}
links {"glfw"}
includedirs { "deps/glfw/include"}
includedirs { "deps/glfw/include"}
files { "deps/SPIRV-Reflect/spirv_reflect.*" }
includedirs { "deps/SPIRV-Reflect" }
includedirs { "deps/slang" }
links {"slang", "slang-glslang"}
includedirs { "deps/slang" }
files {"shaders/**.slang" }
filter "system:windows"
entrypoint "mainCRTStartup"
filter {"system:windows", "platforms:x86"}
links { "$(VULKAN_SDK)/lib32/vulkan-1" }
filter {"system:windows", "platforms:x64"}
links { "$(VULKAN_SDK)/lib/vulkan-1" }
filter "system:linux"
links { "$(VULKAN_SDK)/lib/vulkan",
"dl", "pthread" -- for glfw
}