-
Notifications
You must be signed in to change notification settings - Fork 0
/
SConscript
31 lines (22 loc) · 919 Bytes
/
SConscript
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
import os, sys
Import('env')
envGLFW = env.Clone()
source_files = Split("context.c init.c input.c monitor.c vulkan.c window.c")
if sys.platform == "win32":
envGLFW.Append(CPPDEFINES=['_GLFW_WIN32'])
source_files += Split(
"win32_init.c win32_joystick.c win32_monitor.c win32_time.c "
"win32_tls.c win32_window.c wgl_context.c egl_context.c"
)
elif sys.platform.startswith("linux"):
envGLFW.Append(CPPDEFINES=['_GLFW_X11', '_GLFW_HAS_XF86VM'])
source_files += Split(
"x11_init.c x11_monitor.c x11_window.c xkb_unicode.c linux_joystick.c "
"posix_time.c posix_tls.c glx_context.c egl_context.c"
)
elif sys.platform == "Cocoa": # for now, this is just a reminder
envGLFW.Append(CPPDEFINES=['_GLFW_COCOA', '_GLFW_USE_CHDIR', '_GLFW_USE_MENUBAR', '_GLFW_USE_RETINA'])
envGLFW.StaticLibrary(
"glfw",
source=["src/" + sf for sf in source_files]
)