diff --git a/meson.build b/meson.build index 4d49ff92..851fbc60 100644 --- a/meson.build +++ b/meson.build @@ -505,7 +505,10 @@ conf_data.set('CONFIG_LIBCSS', false) cssdeps = false if conf_data.get('CONFIG_ECMASCRIPT_SMJS') or conf_data.get('CONFIG_QUICKJS') or conf_data.get('CONFIG_MUJS') - cssdeps = dependency('libcss', static: st, version: '>=0.9.2') + cssdeps = dependency('libcss', static: st, version: '>=0.9.2', required: false) + if not cssdeps.found() + cssdeps = dependency('libcss', static: true, version: '>=0.9.2') + endif deps += cssdeps conf_data.set('CONFIG_LIBCSS', true) endif @@ -514,17 +517,26 @@ conf_data.set('CONFIG_LIBDOM', false) libdomdeps = false if conf_data.get('CONFIG_ECMASCRIPT_SMJS') or conf_data.get('CONFIG_QUICKJS') or conf_data.get('CONFIG_MUJS') - libdomdeps = dependency('libdom', static: st, version: '>=0.4.2') + libdomdeps = dependency('libdom', static: st, version: '>=0.4.2', required: false) + if not libdomdeps.found() + libdomdeps = dependency('libdom', static: true, version: '>=0.4.2') + endif deps += libdomdeps conf_data.set('CONFIG_LIBDOM', true) endif if not conf_data.get('CONFIG_LIBCSS') and get_option('libcss') - cssdeps = dependency('libcss', static: st, version: '>=0.9.2') + cssdeps = dependency('libcss', static: st, version: '>=0.9.2', required: false) + if not cssdeps.found() + cssdeps = dependency('libcss', static: true, version: '>=0.9.2') + endif deps += cssdeps conf_data.set('CONFIG_LIBCSS', true) if not conf_data.get('CONFIG_LIBDOM') - libdomdeps = dependency('libdom', static: st, version: '>=0.4.2') + libdomdeps = dependency('libdom', static: st, version: '>=0.4.2', required: false) + if not libdomdeps.found() + libdomdeps = dependency('libdom', static: true, version: '>=0.4.2') + endif deps += libdomdeps conf_data.set('CONFIG_LIBDOM', true) endif