2026-08-09 12:46:14 +10:00
|
|
|
project('tabbed-wlroots', 'c',
|
|
|
|
|
version: '0.1.0',
|
|
|
|
|
meson_version: '>=1.0',
|
|
|
|
|
default_options: ['c_std=c11', 'warning_level=2'])
|
|
|
|
|
|
|
|
|
|
wlroots_ver = '>=0.19,<0.20'
|
|
|
|
|
|
|
|
|
|
# wlroots' pkg-config name varies between distributions (wlroots-0.19 on
|
|
|
|
|
# Debian/Ubuntu, plain wlroots on Arch/Fedora). Prefer the system copy, and
|
|
|
|
|
# fall back to a pinned source build from subprojects/wlroots.wrap when no
|
|
|
|
|
# matching system library is found.
|
|
|
|
|
wlroots = dependency('wlroots-0.19', version: wlroots_ver, required: false)
|
|
|
|
|
if not wlroots.found()
|
|
|
|
|
wlroots = dependency('wlroots', version: wlroots_ver, required: false)
|
|
|
|
|
endif
|
|
|
|
|
if not wlroots.found()
|
|
|
|
|
wlroots_subproj = subproject('wlroots', default_options: ['examples=false'])
|
|
|
|
|
wlroots = wlroots_subproj.get_variable('wlroots')
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
deps = [
|
|
|
|
|
wlroots,
|
|
|
|
|
dependency('wayland-server'),
|
|
|
|
|
dependency('wayland-client'),
|
|
|
|
|
dependency('wayland-egl'),
|
|
|
|
|
dependency('xkbcommon'),
|
|
|
|
|
dependency('egl'),
|
|
|
|
|
dependency('glesv2'),
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
cc = meson.get_compiler('c')
|
|
|
|
|
libm = cc.find_library('m', required: false)
|
|
|
|
|
if libm.found()
|
|
|
|
|
deps += libm
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
executable('tabbed-wlroots',
|
|
|
|
|
'tabbed-wlroots.c',
|
|
|
|
|
'xdg-shell-protocol.c',
|
|
|
|
|
'xdg-decoration-protocol.c',
|
|
|
|
|
dependencies: deps,
|
|
|
|
|
include_directories: include_directories('wlr-protocols'),
|
|
|
|
|
c_args: ['-DWLR_USE_UNSTABLE'])
|
2026-08-10 07:29:10 +10:00
|
|
|
|
|
|
|
|
executable('wltest',
|
|
|
|
|
'tests/wltest.c',
|
|
|
|
|
'xdg-shell-protocol.c',
|
|
|
|
|
dependencies: dependency('wayland-client'),
|
|
|
|
|
include_directories: include_directories('.'))
|