-
Notifications
You must be signed in to change notification settings - Fork 0
/
xmake.lua
92 lines (71 loc) · 2.17 KB
/
xmake.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
-- Project configuration
set_project("Kirei")
set_version("0.0.1")
set_xmakever("2.9.0")
-- Metadata
set_description("Kirei: A Modern UI Framework")
set_license("MIT")
set_warnings("all", "error")
set_languages("cxx20")
-- Common build modes
add_rules("mode.debug", "mode.release")
-- Include directories
add_includedirs("include", "src")
-- Fetch dependencies
add_requires("glfw")
add_requires("glad")
-- Target for Kirei Library (Static Library)
target("Kirei")
set_kind("static")
set_basename("kirei")
-- Set output directory for kirei.lib
set_targetdir("$(buildir)/$(plat)/$(arch)/$(mode)")
-- Source files
add_files("src/core/*.cpp", "src/window/*.cpp", "src/input/*.cpp", "src/renderer/*.cpp")
-- Include directories
add_includedirs("include", "src")
-- Use dependencies
add_packages("glfw", "glad")
-- Platform-specific configurations
if is_plat("windows") then
add_defines("GLFW_INCLUDE_NONE")
end
-- Debug build configurations
if is_mode("debug") then
set_symbols("debug")
add_defines("DEBUG")
set_optimize("none")
end
-- Release build configurations
if is_mode("release") then
set_optimize("fastest")
set_strip("all")
end
-- Target for Showroom Example Project
target("showroom")
set_kind("binary")
set_basename("showroom")
set_group("examples")
-- Set dependency on Kirei library
add_deps("Kirei")
-- Source files for example project
add_files("examples/showroom/*.cpp")
-- Include directories for examples
add_includedirs("include", "src", "examples/showroom")
-- Link with Kirei static library
add_links("kirei")
-- Explicitly set the link directory to where Kirei's .lib file is generated
add_linkdirs("$(buildir)/$(plat)/$(arch)/$(mode)")
-- Use dependencies
add_packages("glfw", "glad")
-- Debug build configurations
if is_mode("debug") then
set_symbols("debug")
add_defines("DEBUG")
set_optimize("none")
end
-- Release build configurations
if is_mode("release") then
set_optimize("fastest")
set_strip("all")
end