-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathxmake.lua
More file actions
32 lines (27 loc) · 1008 Bytes
/
xmake.lua
File metadata and controls
32 lines (27 loc) · 1008 Bytes
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
add_rules("mode.debug", "mode.release")
set_policy("build.warning", true)
set_warnings("all", "extra")
if (is_plat("linux")) then
add_requires("glfw", {configs = {wayland = true}})
else
add_requires("glfw")
end
add_requires("glm", "vulkan-hpp", "vulkan-memory-allocator")
includes("third_party/")
target("learn_vulkan", function()
set_kind("binary")
set_languages("c17", "c++23")
add_files("src/**.cpp")
add_packages("glfw", "glm", "vulkan-hpp", "vulkan-memory-allocator")
add_deps("imgui_vulkan_glfw", "stb")
add_defines("GLFW_INCLUDE_VULKAN")
add_defines("VK_NO_PROTOTYPES")
add_defines("VULKAN_HPP_NO_CONSTRUCTORS")
add_defines("VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=1")
add_defines("VMA_STATIC_VULKAN_FUNCTIONS=0",
"VMA_DYNAMIC_VULKAN_FUNCTIONS=1")
add_defines("GLM_FORCE_DEPTH_ZERO_TO_ONE", "GLM_ENABLE_EXPERIMENTAL")
on_load(function(target)
if (is_plat("mingw")) then target:add("links", "stdc++exp") end
end)
end)