-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPremake5.lua
92 lines (75 loc) · 2.55 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
workspace "RenderApp"
configurations {"Debug", "Release"}
architecture "x86_64"
startproject "RenderApp"
VULKAN_SDK = os.getenv("VULKAN_SDK")
outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
IncludeDir = {}
IncludeDir["GLFW"] = "%{wks.location}/Dependencies/GLFW/include"
IncludeDir["GLAD"] = "%{wks.location}/Dependencies/glad/include"
IncludeDir["VulkanSDK"] = "%{VULKAN_SDK}/Include"
IncludeDir["glm"] = "Dependencies/glm"
LibraryDir = {}
LibraryDir["VulkanSDK"] = "%{VULKAN_SDK}/Lib"
Library = {}
Library["Vulkan"] = "%{LibraryDir.VulkanSDK}/vulkan-1.lib"
Library["VulkanUtils"] = "%{LibraryDir.VulkanSDK}/VkLayer_utils.lib"
Library["ShaderC_Debug"] = "%{LibraryDir.VulkanSDK}/shaderc_sharedd.lib"
Library["SPIRV_Cross_Debug"] = "%{LibraryDir.VulkanSDK}/spirv-cross-cored.lib"
Library["SPIRV_Cross_GLSL_Debug"] = "%{LibraryDir.VulkanSDK}/spirv-cross-glsld.lib"
Library["SPIRV_Tools_Debug"] = "%{LibraryDir.VulkanSDK}/SPIRV-Toolsd.lib"
Library["ShaderC_Release"] = "%{LibraryDir.VulkanSDK}/shaderc_shared.lib"
Library["SPIRV_Cross_Release"] = "%{LibraryDir.VulkanSDK}/spirv-cross-core.lib"
Library["SPIRV_Cross_GLSL_Release"] = "%{LibraryDir.VulkanSDK}/spirv-cross-glsl.lib"
group "Dependencies"
include "Dependencies/GLFW"
group ""
project "RenderApp"
kind "ConsoleApp"
language "C++"
cppdialect "C++17"
pchheader "Renderpch.h"
pchsource "%{prj.name}/Renderpch.cpp"
includedirs
{
"%{IncludeDir.GLFW}",
"%{IncludeDir.VulkanSDK}",
"%{IncludeDir.glm}",
"%{prj.name}"
}
links
{
"GLFW",
"%{Library.Vulkan}",
"%{Library.VulkanUtils}"
}
targetdir ("%{wks.location}/bin/" .. outputdir .. "/%{prj.name}")
objdir ("%{wks.location}/bin-int/" .. outputdir .. "/%{prj.name}")
files {
"%{prj.name}/**.h", "%{prj.name}/**.cpp",
"Dependencies/glm/glm/**.hpp",
"Dependencies/glm/glm/**.inl",
}
defines {" _GLFW_ "}
filter "system:windows"
defines { "VK_USE_PLATFORM_WIN32_KHR" }
filter { "configurations:Debug" }
defines { "DEBUG" }
runtime "Debug"
symbols "On"
links
{
"%{Library.ShaderC_Debug}",
"%{Library.SPIRV_Cross_Debug}",
"%{Library.SPIRV_Cross_GLSL_Debug}"
}
filter { "configurations:Release" }
defines { "NDEBUG" }
runtime "Release"
optimize "On"
links
{
"%{Library.ShaderC_Release}",
"%{Library.SPIRV_Cross_Release}",
"%{Library.SPIRV_Cross_GLSL_Release}"
}