2dd5a792bb
The loaders have been generated through hpvb's dynload-wrapper, although they had to be heavily handpatched to workaround some already reported issues with it. I added a note to each generated file to account for that. As GLAD uses X11 stuff directly, I had to define the GLAD_GLX_NO_X11 macro to not let do it that, and handle myself the display loading and screen handling part myself, which wasn't that hard but it's still something worth saying. I plan to improve greatly the X11 backend (including this aspect) but, as the release isn't that far and I'm also working on the Wayland backend, this will do for now, I hope.
30 lines
712 B
Python
30 lines
712 B
Python
#!/usr/bin/env python
|
|
|
|
Import("env")
|
|
|
|
source_files = [
|
|
"display_server_x11.cpp",
|
|
"key_mapping_x11.cpp",
|
|
"dynwrappers/xlib-so_wrap.c",
|
|
"dynwrappers/xcursor-so_wrap.c",
|
|
"dynwrappers/xinerama-so_wrap.c",
|
|
"dynwrappers/xinput2-so_wrap.c",
|
|
"dynwrappers/xrandr-so_wrap.c",
|
|
"dynwrappers/xrender-so_wrap.c",
|
|
"dynwrappers/xext-so_wrap.c",
|
|
]
|
|
|
|
if env["vulkan"]:
|
|
source_files.append("vulkan_context_x11.cpp")
|
|
|
|
if env["opengl3"]:
|
|
env.Append(CPPDEFINES=["GLAD_GLX_NO_X11"])
|
|
source_files.append(["gl_manager_x11.cpp", "detect_prime_x11.cpp", "#thirdparty/glad/glx.c"])
|
|
|
|
objects = []
|
|
|
|
for source_file in source_files:
|
|
objects.append(env.Object(source_file))
|
|
|
|
Return("objects")
|