From 0a32118953d04fc65fc3db7ad2ddce31206802d1 Mon Sep 17 00:00:00 2001 From: StratusFearMe21 <57533634+StratusFearMe21@users.noreply.github.com> Date: Sun, 15 Jan 2023 22:28:32 +0000 Subject: [PATCH] Update meson.build --- meson.build | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/meson.build b/meson.build index c98f5b0..eb6b46c 100644 --- a/meson.build +++ b/meson.build @@ -13,6 +13,17 @@ wlroots_dep = dependency('wlroots') xkbcommon_dep = dependency('xkbcommon') libinput_dep = dependency('libinput') +c_args = [ + '-DWLR_USE_UNSTABLE', + '-D_POSIX_C_SOURCE=200809L', + '-DXWAYLAND', + '-DVERSION="@0@"'.format(meson.project_version()) +] + +if xcb.found() and xlibs.found() + c_args += '-DXWAYLAND' + endif + executable('dwl', 'dwl.c', 'util.c', @@ -27,12 +38,7 @@ executable('dwl', libinput_dep, ], install : true, - c_args : [ - '-DWLR_USE_UNSTABLE', - '-D_POSIX_C_SOURCE=200809L', - '-DXWAYLAND', - '-DVERSION="@0@"'.format(meson.project_version()) - ] + c_args : c_args ) install_man('dwl.1')