1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-11 13:10:58 +00:00

LinuxBSD now compiles without vulkan/x11.

This commit is contained in:
Fabio Alessandrelli
2021-05-25 18:26:38 +02:00
parent ae04dac2db
commit 8594613f94
8 changed files with 36 additions and 182 deletions

View File

@@ -73,6 +73,7 @@ def get_opts():
BoolVariable("use_msan", "Use LLVM compiler memory sanitizer (MSAN)", False),
BoolVariable("pulseaudio", "Detect and use PulseAudio", True),
BoolVariable("udev", "Use udev for gamepad connection callbacks", True),
BoolVariable("x11", "Enable X11 display", True),
BoolVariable("debug_symbols", "Add debugging symbols to release/release_debug builds", True),
BoolVariable("separate_debug_symbols", "Create a separate file containing debugging symbols", False),
BoolVariable("touch", "Enable touch events", True),
@@ -362,18 +363,26 @@ def configure(env):
env.ParseConfig("pkg-config zlib --cflags --libs")
env.Prepend(CPPPATH=["#platform/linuxbsd"])
env.Append(CPPDEFINES=["X11_ENABLED", "UNIX_ENABLED"])
if env["x11"]:
if not env["vulkan"]:
print("Error: X11 support requires vulkan=yes")
env.Exit(255)
env.Append(CPPDEFINES=["X11_ENABLED"])
env.Append(CPPDEFINES=["UNIX_ENABLED"])
env.Append(CPPDEFINES=[("_FILE_OFFSET_BITS", 64)])
env.Append(CPPDEFINES=["VULKAN_ENABLED"])
if not env["builtin_vulkan"]:
env.ParseConfig("pkg-config vulkan --cflags --libs")
if not env["builtin_glslang"]:
# No pkgconfig file for glslang so far
env.Append(LIBS=["glslang", "SPIRV"])
if env["vulkan"]:
env.Append(CPPDEFINES=["VULKAN_ENABLED"])
if not env["builtin_vulkan"]:
env.ParseConfig("pkg-config vulkan --cflags --libs")
if not env["builtin_glslang"]:
# No pkgconfig file for glslang so far
env.Append(LIBS=["glslang", "SPIRV"])
# env.Append(CPPDEFINES=['OPENGL_ENABLED'])
env.Append(LIBS=["GL"])
# env.Append(CPPDEFINES=['OPENGL_ENABLED'])
env.Append(LIBS=["GL"])
env.Append(LIBS=["pthread"])