diff --git a/meson.build b/meson.build index 53cfc5d0..5b616cac 100644 --- a/meson.build +++ b/meson.build @@ -79,7 +79,12 @@ have_xwayland = xcb.found() and wlroots_has_xwayland conf_data = configuration_data() conf_data.set10('HAVE_XWAYLAND', have_xwayland) -conf_data.set10('HAVE_RSVG', svg.found()) +if get_option('svg').disabled() + have_rsvg = false +else + have_rsvg = svg.found() +endif +conf_data.set10('HAVE_RSVG', have_rsvg) msgfmt = find_program('msgfmt', required: get_option('nls')) if msgfmt.found() @@ -109,7 +114,7 @@ labwc_deps = [ math, png, ] -if svg.found() +if have_rsvg labwc_deps += [ svg, ] diff --git a/meson_options.txt b/meson_options.txt index 00558f17..9104ec9a 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,3 +1,4 @@ option('man-pages', type: 'feature', value: 'auto', description: 'Generate and install man pages') option('xwayland', type: 'feature', value: 'auto', description: 'Enable support for X11 applications') +option('svg', type: 'feature', value: 'enabled', description: 'Enable svg window buttons') option('nls', type: 'feature', value: 'auto', description: 'Enable native language support') diff --git a/src/button/meson.build b/src/button/meson.build index f0f24e96..2e587eaf 100644 --- a/src/button/meson.build +++ b/src/button/meson.build @@ -4,7 +4,7 @@ labwc_sources += files( 'common.c', ) -if svg.found() +if have_rsvg labwc_sources += files( 'button-svg.c', )