-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpremake5.lua
More file actions
82 lines (64 loc) · 1.38 KB
/
premake5.lua
File metadata and controls
82 lines (64 loc) · 1.38 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
require("premake-ecc/ecc")
workspace("LearningVulkan")
startproject("LearningVulkan")
configurations({
"Debug",
"Release",
})
flags({
"MultiProcessorCompile",
})
outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
include("vendor/GLFW")
VULKAN_SDK = os.getenv("VULKAN_SDK")
print(VULKAN_SDK .. "/lib/libvulkan.1.4.313.dylib")
project("LearningVulkan")
kind("ConsoleApp")
language("C++")
cppdialect("C++20")
staticruntime("Off")
targetdir("%{prj.location}/bin/" .. outputdir)
objdir("%{prj.location}/bin-int/" .. outputdir)
files({
"src/**.h",
"src/**.cpp",
"%{wks.location}/Vendor/stb/**.h",
"%{wks.location}/Vendor/stb/**.cpp",
})
includedirs({
"src",
"%{wks.location}/Vendor/GLFW/include",
"%{wks.location}/Vendor/glm",
"%{VULKAN_SDK}/Include",
"%{wks.location}/Vendor/stb",
})
links({
"GLFW",
})
filter("system:windows")
architecture("x64")
systemversion("latest")
links({
"%{VULKAN_SDK}/Lib/vulkan-1.lib",
})
defines({
"_CRT_SECURE_NO_WARNINGS",
})
filter("system:macosx")
architecture("ARM64")
libdirs({ "/usr/local/lib", "%{VULKAN_SDK}/lib" })
links({
"CoreFoundation.framework", -- no path needed for system frameworks
"Cocoa.framework",
"IOKit.framework",
"QuartzCore.framework",
"vulkan",
})
filter("configurations:Debug")
defines("DEBUG")
runtime("Debug")
symbols("on")
filter("configurations:Release")
defines("RELEASE")
runtime("Release")
optimize("on")