linux optionality stuff

This commit is contained in:
Mars 2025-05-10 16:35:23 -04:00
parent 3c154878d3
commit bb4ccb5d42
Signed by: pupbrained
GPG key ID: 0FF5B8826803F895
2 changed files with 42 additions and 9 deletions

View file

@ -134,16 +134,31 @@ elif host_system == 'windows'
cpp.find_library('dwmapi'),
cpp.find_library('windowsapp'),
]
elif host_system != 'serenity'
elif host_system != 'serenity' and host_system != 'haiku'
# Make dbus, x11, and wayland dependencies optional
dbus_dep = dependency('dbus-1', required: false)
xcb_dep = dependency('xcb', required: false)
xau_dep = dependency('xau', required: false)
xdmcp_dep = dependency('xdmcp', required: false)
wayland_dep = dependency('wayland-client', required: false)
platform_deps += [
dependency('SQLiteCpp'),
dependency('pugixml'),
dependency('xcb'),
dependency('xau'),
dependency('xdmcp'),
dependency('wayland-client'),
dependency('dbus-1'),
]
if dbus_dep.found()
platform_deps += dbus_dep
add_project_arguments('-DHAVE_DBUS', language: 'cpp')
endif
if xcb_dep.found() and xau_dep.found() and xdmcp_dep.found()
platform_deps += [xcb_dep, xau_dep, xdmcp_dep]
add_project_arguments('-DHAVE_XCB', language: 'cpp')
endif
if wayland_dep.found()
platform_deps += wayland_dep
add_project_arguments('-DHAVE_WAYLAND', language: 'cpp')
endif
endif
# FTXUI configuration
@ -201,4 +216,4 @@ executable(
link_args: link_args,
dependencies: deps,
install: true,
)
)