-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlpugl_opengl-scm-0.rockspec
77 lines (76 loc) · 2.16 KB
/
lpugl_opengl-scm-0.rockspec
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
package = "lpugl_opengl"
version = "scm-0"
source = {
url = "https://github.com/osch/lua-lpugl/archive/master.zip",
dir = "lua-lpugl-master",
}
description = {
summary = "OpenGL backend for LPugl, a minimal API for building GUIs",
homepage = "https://github.com/osch/lua-lpugl",
license = "MIT/X11",
detailed = [[
LPugl is a minimal portable Lua-API for building GUIs.
Supported platforms: X11, Windows and Mac OS X.
LPugl is based on Pugl, a minimal portable API for embeddable GUIs,
see: https://drobilla.net/software/pugl
]],
}
dependencies = {
"lua >= 5.1, <= 5.4",
"luarocks-build-extended",
"lpugl",
}
build = {
type = "extended",
external_dependencies = {
GL = { header = "GL/gl.h" },
},
platforms = {
linux = {
modules = {
["lpugl_opengl"] = {
libraries = { "GL", "pthread" },
}
}
},
windows = {
modules = {
["lpugl_opengl"] = {
libraries = { "opengl32", "kernel32", "gdi32", "user32" },
}
}
},
macosx = {
external_dependencies = {
-- for Mac OS: OpenGL headers are under "$(xcrun --sdk macosx --show-sdk-path)/System/Library/Frameworks/OpenGL.framework/Headers"
-- (e.g. /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenGL.framework/Headers)
-- They must be included using "OpenGL/gl.h" and cannot be found by luarocks in the file system
GL = { header = false },
},
modules = {
["lpugl_opengl"] = {
sources = { "src/pugl_opengl.m" },
libraries = { "pthread" },
variables = {
LIBFLAG_EXTRAS = { "-framework", "Cocoa",
"-framework", "OpenGL",
}
}
}
}
},
},
modules = {
["lpugl_opengl"] = {
sources = { "src/pugl_opengl.c",
"src/lpugl_opengl.c",
"src/lpugl_compat.c" },
defines = {
"LPUGL_VERSION="..version:gsub("^(.*)-.-$", "%1"),
"LPUGL_BUILD_DATE=$(BUILD_DATE)"
},
incdirs = { "pugl-repo", "$(GL_INCDIR)" },
libdirs = { "$(GL_LIBDIR)" },
},
}
}