diff options
Diffstat (limited to 'meson.build')
| -rw-r--r-- | meson.build | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/meson.build b/meson.build index 8e396d8..5049872 100644 --- a/meson.build +++ b/meson.build @@ -20,6 +20,7 @@ sources = [] has_wayland = false has_x11 = false +has_dbus = false has_cocoa = system == 'darwin' if system == 'linux' @@ -40,6 +41,11 @@ if system == 'linux' add_project_arguments('-DYASL_HAS_XRANDR=1', language: 'c') endif endif + dbus = dependency('dbus-1', required: get_option('dbus')) + has_dbus = dbus.found() + if has_dbus + deps += [dbus] + endif m_dep = cc.find_library('m', required: false) rt_dep = cc.find_library('rt', required: false) deps += [m_dep, rt_dep] @@ -57,7 +63,7 @@ elif system == 'darwin' error('Cocoa requires macOS 14 or newer. Set MACOSX_DEPLOYMENT_TARGET=14.0 or a newer target before configuring.') endif deps += [ - dependency('appleframeworks', modules: ['AppKit', 'Metal', 'QuartzCore']), + dependency('appleframeworks', modules: ['AppKit', 'Metal', 'QuartzCore', 'UserNotifications']), ] else error('YASL supports Linux and macOS.') @@ -71,6 +77,7 @@ add_project_arguments( '-DYASL_HAS_WAYLAND=' + (has_wayland ? '1' : '0'), '-DYASL_HAS_X11=' + (has_x11 ? '1' : '0'), '-DYASL_HAS_COCOA=' + (has_cocoa ? '1' : '0'), + '-DYASL_HAS_DBUS=' + (has_dbus ? '1' : '0'), language: has_cocoa ? ['c', 'objc'] : ['c'], ) if has_cocoa |
