|
@@ -3,6 +3,8 @@ from misc.utility.scons_hints import *
|
|
|
|
|
|
|
|
Import("env")
|
|
Import("env")
|
|
|
|
|
|
|
|
|
|
+File = env.File
|
|
|
|
|
+
|
|
|
# TODO: Add warning to headers and code about their autogenerated status.
|
|
# TODO: Add warning to headers and code about their autogenerated status.
|
|
|
if env["use_sowrap"]:
|
|
if env["use_sowrap"]:
|
|
|
# We have to implement separate builders for so wrappers as the
|
|
# We have to implement separate builders for so wrappers as the
|
|
@@ -41,14 +43,14 @@ else:
|
|
|
|
|
|
|
|
|
|
|
|
|
def generate_from_xml(name, path):
|
|
def generate_from_xml(name, path):
|
|
|
- header = env.WAYLAND_API_HEADER(f"protocol/{name}.gen.h", path)
|
|
|
|
|
- source = env.WAYLAND_API_CODE(f"protocol/{name}.gen.c", path)
|
|
|
|
|
|
|
+ header = env.WAYLAND_API_HEADER(File(f"protocol/{name}.gen.h"), path)
|
|
|
|
|
+ source = env.WAYLAND_API_CODE(File(f"protocol/{name}.gen.c"), path)
|
|
|
env.NoCache(header, source)
|
|
env.NoCache(header, source)
|
|
|
|
|
|
|
|
- return env.Object(f"protocol/{name}.gen.c")
|
|
|
|
|
|
|
+ return source
|
|
|
|
|
|
|
|
|
|
|
|
|
-objects = [
|
|
|
|
|
|
|
+generated_sources = [
|
|
|
# Core protocol
|
|
# Core protocol
|
|
|
generate_from_xml("wayland", "#thirdparty/wayland/protocol/wayland.xml"),
|
|
generate_from_xml("wayland", "#thirdparty/wayland/protocol/wayland.xml"),
|
|
|
# Stable protocols
|
|
# Stable protocols
|
|
@@ -97,34 +99,31 @@ objects = [
|
|
|
),
|
|
),
|
|
|
]
|
|
]
|
|
|
|
|
|
|
|
-source_files = [
|
|
|
|
|
- "detect_prime_egl.cpp",
|
|
|
|
|
- "display_server_wayland.cpp",
|
|
|
|
|
- "key_mapping_xkb.cpp",
|
|
|
|
|
- "wayland_thread.cpp",
|
|
|
|
|
|
|
+source_files = generated_sources + [
|
|
|
|
|
+ File("detect_prime_egl.cpp"),
|
|
|
|
|
+ File("display_server_wayland.cpp"),
|
|
|
|
|
+ File("key_mapping_xkb.cpp"),
|
|
|
|
|
+ File("wayland_thread.cpp"),
|
|
|
]
|
|
]
|
|
|
|
|
|
|
|
if env["use_sowrap"]:
|
|
if env["use_sowrap"]:
|
|
|
source_files.append(
|
|
source_files.append(
|
|
|
[
|
|
[
|
|
|
- "dynwrappers/wayland-cursor-so_wrap.c",
|
|
|
|
|
- "dynwrappers/wayland-client-core-so_wrap.c",
|
|
|
|
|
- "dynwrappers/wayland-egl-core-so_wrap.c",
|
|
|
|
|
|
|
+ File("dynwrappers/wayland-cursor-so_wrap.c"),
|
|
|
|
|
+ File("dynwrappers/wayland-client-core-so_wrap.c"),
|
|
|
|
|
+ File("dynwrappers/wayland-egl-core-so_wrap.c"),
|
|
|
]
|
|
]
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
if env["libdecor"]:
|
|
if env["libdecor"]:
|
|
|
- source_files.append("dynwrappers/libdecor-so_wrap.c")
|
|
|
|
|
|
|
+ source_files.append(File("dynwrappers/libdecor-so_wrap.c"))
|
|
|
|
|
|
|
|
|
|
|
|
|
if env["vulkan"]:
|
|
if env["vulkan"]:
|
|
|
- source_files.append("rendering_context_driver_vulkan_wayland.cpp")
|
|
|
|
|
|
|
+ source_files.append(File("rendering_context_driver_vulkan_wayland.cpp"))
|
|
|
|
|
|
|
|
if env["opengl3"]:
|
|
if env["opengl3"]:
|
|
|
- source_files.append("egl_manager_wayland.cpp")
|
|
|
|
|
- source_files.append("egl_manager_wayland_gles.cpp")
|
|
|
|
|
-
|
|
|
|
|
-for source_file in source_files:
|
|
|
|
|
- objects.append(env.Object(source_file))
|
|
|
|
|
|
|
+ source_files.append(File("egl_manager_wayland.cpp"))
|
|
|
|
|
+ source_files.append(File("egl_manager_wayland_gles.cpp"))
|
|
|
|
|
|
|
|
-Return("objects")
|
|
|
|
|
|
|
+Return("source_files")
|