-
Notifications
You must be signed in to change notification settings - Fork 0
/
premake5.lua
67 lines (55 loc) · 1.76 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
-- premake5.lua
workspace "VulkanTest"
configurations { "Debug", "Release" }
startproject "VulkanTest"
includedirs { "." }
configuration "windows"
includedirs { "$(VK_SDK_PATH)/Include", "external/glfw-3.2.1/include", "external/glm-0.9.9-a2" }
libdirs { "$(VK_SDK_PATH)/Lib" }
if _ACTION == "vs2012" then
libdirs { "external/glfw-3.2.1/lib-vc2012" }
elseif _ACTION == "vs2013" then
libdirs { "external/glfw-3.2.1/lib-vc2013" }
else
libdirs { "external/glfw-3.2.1/lib-vc2015" }
end
links { "vulkan-1.lib", "glfw3" }
defines { "WIN32" }
architecture "x86_64"
configuration "vs*"
--defines { "_CRT_SECURE_NO_WARNINGS" }
project "VulkanTest"
location "source"
kind "ConsoleApp"
language "C++"
targetdir "bin/%{cfg.buildcfg}"
debugdir "."
pchheader "stdafx.h"
pchsource "source/stdafx.cpp"
files
{
"source/**.h",
"source/**.c",
"source/**.cpp",
"shaders/**.vert",
"shaders/**.frag",
}
filter "configurations:Debug"
defines { "DEBUG", "MEM_DEBUG" }
symbols "On"
libdirs { "lib/Debug" }
filter "configurations:Release"
defines { "NDEBUG" }
optimize "On"
libdirs { "lib/Release" }
filter 'files:**.vert or files:**.frag'
-- A message to display while this build step is running (optional)
buildmessage 'Compiling %{file.relpath}'
-- One or more commands to run (required)
buildcommands {
-- 'glslangValidator -V -o "%{file.basename}%{file.extension}.spv" "%{file.relpath}"'
'glslangValidator -V -o "%{file.relpath}.spv" "%{file.relpath}"'
}
-- One or more outputs resulting from the build (required)
--buildoutputs { '%{file.basename}%{file.extension}.spv' }
buildoutputs { '%{file.relpath}.spv' }