~bl4ckb0ne/wxrc

bd2734ce93b955176bc2d30c51b9209e990e744c — Simon Zeni 1 year, 3 months ago 4b609aa
meson: hijack wlroots logger
1 files changed, 26 insertions(+), 0 deletions(-)

M meson.build
M meson.build => meson.build +26 -0
@@ 11,8 11,34 @@ project(
	],
)

# Compute relative path to use the wlroots logging util
# TODO make our own
source_root = meson.current_source_dir().split('/')
build_root = meson.global_build_root().split('/')
relative_dir_parts = []
i = 0
in_prefix = true
foreach p : build_root
	if i >= source_root.length() or not in_prefix or p != source_root[i]
		in_prefix = false
		relative_dir_parts += '..'
	endif
	i += 1
endforeach
i = 0
in_prefix = true
foreach p : source_root
	if i >= build_root.length() or not in_prefix or build_root[i] != p
		in_prefix = false
		relative_dir_parts += p
	endif
	i += 1
endforeach
relative_dir = join_paths(relative_dir_parts) + '/'

add_project_arguments([
	'-DWLR_USE_UNSTABLE',
	'-DWLR_REL_SRC_DIR="@0@"'.format(relative_dir),

	'-DXR_USE_GRAPHICS_API_OPENGL_ES',
	'-DXR_USE_PLATFORM_EGL',