-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathcompat.glfw.lua
More file actions
132 lines (127 loc) · 4.24 KB
/
Copy pathcompat.glfw.lua
File metadata and controls
132 lines (127 loc) · 4.24 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
package = {
spec = "1",
namespace = "compat",
name = "compat.glfw",
description = "GLFW windowing and input library built from upstream sources",
licenses = {"Zlib"},
repo = "https://github.com/glfw/glfw",
type = "package",
xpm = {
linux = {
["3.4"] = {
url = "https://github.com/glfw/glfw/archive/refs/tags/3.4.tar.gz",
sha256 = "c038d34200234d071fae9345bc455e4a8f2f544ab60150765d7704e08f3dac01",
},
},
macosx = {
["3.4"] = {
url = "https://github.com/glfw/glfw/archive/refs/tags/3.4.tar.gz",
sha256 = "c038d34200234d071fae9345bc455e4a8f2f544ab60150765d7704e08f3dac01",
},
},
windows = {
["3.4"] = {
url = "https://github.com/glfw/glfw/archive/refs/tags/3.4.tar.gz",
sha256 = "c038d34200234d071fae9345bc455e4a8f2f544ab60150765d7704e08f3dac01",
},
},
},
mcpp = {
language = "c++23",
import_std = false,
c_standard = "c11",
include_dirs = {"include", "src"},
sources = {
"src/context.c",
"src/init.c",
"src/input.c",
"src/monitor.c",
"src/platform.c",
"src/vulkan.c",
"src/window.c",
"src/egl_context.c",
"src/osmesa_context.c",
"src/null_init.c",
"src/null_monitor.c",
"src/null_window.c",
"src/null_joystick.c",
},
targets = { ["glfw"] = { kind = "lib" } },
deps = {
["compat.opengl"] = "2026.05.31",
},
linux = {
cflags = { "-D_DEFAULT_SOURCE", "-D_GLFW_X11" },
runtime = {
dlopen_libs = { "libGLX.so.0", "libGL.so.1", "libGL.so" },
capabilities = { "x11.display", "opengl.glx.driver", "abi:glibc" },
},
sources = {
"src/x11_init.c",
"src/x11_monitor.c",
"src/x11_window.c",
"src/xkb_unicode.c",
"src/glx_context.c",
"src/linux_joystick.c",
"src/posix_poll.c",
"src/posix_time.c",
"src/posix_thread.c",
"src/posix_module.c",
},
deps = {
["compat.glx-runtime"] = "2026.06.03",
["compat.x11"] = "1.8.13",
["compat.xcursor"] = "1.2.3",
["compat.xext"] = "1.3.7",
["compat.xfixes"] = "6.0.2",
["compat.xi"] = "1.8.3",
["compat.xinerama"] = "1.1.6",
["compat.xorgproto"] = "2025.1",
["compat.xrandr"] = "1.5.5",
["compat.xrender"] = "0.9.12",
},
},
macosx = {
cflags = { "-D_GLFW_COCOA" },
sources = {
"src/cocoa_time.c",
"src/posix_thread.c",
"src/posix_module.c",
"src/cocoa_init.m",
"src/cocoa_joystick.m",
"src/cocoa_monitor.m",
"src/cocoa_window.m",
"src/nsgl_context.m",
},
ldflags = {
"-framework", "Cocoa",
"-framework", "IOKit",
"-framework", "CoreFoundation",
},
},
windows = {
cflags = { "-D_GLFW_WIN32", "-DUNICODE", "-D_UNICODE" },
sources = {
"src/win32_time.c",
"src/win32_thread.c",
"src/win32_module.c",
"src/win32_init.c",
"src/win32_joystick.c",
"src/win32_monitor.c",
"src/win32_window.c",
"src/wgl_context.c",
},
ldflags = { "-lgdi32" },
},
},
}
import("xim.libxpkg.pkginfo")
function install()
local srcdir = pkginfo.install_file():replace(".tar.gz", "")
if not os.isdir(srcdir) then
srcdir = "glfw-" .. pkginfo.version()
end
os.tryrm(pkginfo.install_dir())
os.mv(srcdir, pkginfo.install_dir())
return true
end