config: support rc.yaml

Based on @johanmalm's work.

This adds libyaml as an optional dependency.
This commit is contained in:
tokyo4j 2024-08-18 12:22:07 +09:00
parent a0a9f977b4
commit 85b6e25484
13 changed files with 588 additions and 31 deletions

View file

@ -72,6 +72,7 @@ pixman = dependency('pixman-1')
math = cc.find_library('m')
png = dependency('libpng')
svg = dependency('librsvg-2.0', version: '>=2.46', required: false)
yaml = dependency('yaml-0.1', required: false)
if get_option('xwayland').enabled() and not wlroots_has_xwayland
error('no wlroots Xwayland support')
@ -87,6 +88,13 @@ else
endif
conf_data.set10('HAVE_RSVG', have_rsvg)
if get_option('yaml').disabled()
have_libyaml = false
else
have_libyaml = yaml.found()
endif
conf_data.set10('HAVE_LIBYAML', have_libyaml)
if get_option('static_analyzer').enabled()
add_project_arguments(['-fanalyzer'], language: 'c')
endif
@ -125,6 +133,11 @@ if have_rsvg
svg,
]
endif
if have_libyaml
labwc_deps += [
yaml,
]
endif
subdir('include')
subdir('src')