-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpremake5.lua
46 lines (39 loc) · 1.12 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
---@diagnostic disable: undefined-global, undefined-field
VULKAN_SDK = os.getenv("VULKAN_SDK")
workspace("Cnake")
configurations({ "Debug", "Release" })
platforms({ "Win64" })
location("build")
project("Cnake")
kind("ConsoleApp")
language("C++")
cppdialect("C++20")
targetdir("bin/%{cfg.buildcfg}")
includedirs({ "./vendor/GLM/", "./vendor/GLFW/include/", "%{VULKAN_SDK}/Include/" })
syslibdirs({ "%{VULKAN_SDK}/Lib/", "./vendor/GLFW/lib-vc2022/" })
files({ "**.h", "**.cpp" })
filter("configurations:Debug")
defines({ "DEBUG" })
symbols("On")
ignoredefaultlibraries({ "MSVCRT" })
filter("configurations:Release")
defines({ "NDEBUG" })
optimize("On")
filter("platforms:Win64")
system("Windows")
architecture("x86_64")
filter("action:vs*")
linkoptions({ "vulkan-1.lib", "glfw3.lib" })
newaction({
trigger = "clean",
description = "clean the software",
execute = function()
print("clean the build...")
os.rmdir("./build/")
os.rmdir("./bin/")
os.remove("BuildRules.xml")
os.remove("BuildRules.props")
os.remove("BuildRules.targets")
print("done.")
end,
})