Add basic scaffolding for including libsfdo in builds

This commit is contained in:
myrslint 2025-04-16 03:23:40 +00:00
parent 3f0b3f8f9b
commit d9a6bdb85e
2 changed files with 31 additions and 0 deletions

View file

@ -37,6 +37,34 @@ if is_freebsd
add_project_arguments('-D_C11_SOURCE', language: 'c')
endif
# Check for (currrently) optional libsfdo
sfdo_basedir = dependency(
'libsfdo-basedir',
default_options: ['default_library=static', 'examples=false', 'tests=false'],
version: '>=0.1.3',
required: get_option('sfdo'),
)
sfdo_desktop = dependency(
'libsfdo-desktop',
default_options: ['default_library=static', 'examples=false', 'tests=false'],
version: '>=0.1.3',
required: get_option('sfdo'),
)
sfdo_desktop_file = dependency(
'libsfdo-desktop-file',
default_options: ['default_library=static', 'examples=false', 'tests=false'],
version: '>=0.1.3',
required: get_option('sfdo'),
)
sfdo_icon = dependency(
'libsfdo-icon',
default_options: ['default_library=static', 'examples=false', 'tests=false'],
version: '>=0.1.3',
required: get_option('sfdo'),
)
have_libsfdo = sfdo_basedir.found() and sfdo_desktop.found() and sfdo_desktop_file.found() and sfdo_icon.found()
# Execute the wlroots subproject, if any
wlroots_version = ['>=0.19.0', '<0.20.0']
subproject(
@ -107,6 +135,7 @@ conf_data = configuration_data()
conf_data.set10('HAVE_GDK_PIXBUF', gdk_pixbuf.found())
conf_data.set10('HAVE_LIBSYSTEMD', sdbus.found() and sdbus.name() == 'libsystemd')
conf_data.set10('HAVE_LIBELOGIND', sdbus.found() and sdbus.name() == 'libelogind')
conf_data.set10('HAVE_LIBSFDO', have_libsfdo)
conf_data.set10('HAVE_BASU', sdbus.found() and sdbus.name() == 'basu')
conf_data.set10('HAVE_TRAY', have_tray)
foreach sym : ['LIBINPUT_CONFIG_ACCEL_PROFILE_CUSTOM', 'LIBINPUT_CONFIG_DRAG_LOCK_ENABLED_STICKY']
@ -243,5 +272,6 @@ subdir('completions')
summary({
'gdk-pixbuf': gdk_pixbuf.found(),
'tray': have_tray,
'libsfdo': have_libsfdo,
'man-pages': scdoc.found(),
}, bool_yn: true)

View file

@ -8,3 +8,4 @@ option('tray', type: 'feature', value: 'auto', description: 'Enable support for
option('gdk-pixbuf', type: 'feature', value: 'auto', description: 'Enable support for more image formats in swaybar tray')
option('man-pages', type: 'feature', value: 'auto', description: 'Generate and install man pages')
option('sd-bus-provider', type: 'combo', choices: ['auto', 'libsystemd', 'libelogind', 'basu'], value: 'auto', description: 'Provider of the sd-bus library')
option('sfdo', type: 'feature', value: 'auto', description: 'Enable libsfdo integration')