diff --git a/meson.build b/meson.build index 4e589a9585..ce16d6a647 100644 --- a/meson.build +++ b/meson.build @@ -68,13 +68,12 @@ if brotli_dep.found() endif if get_option('webready') - curl_dep = dependency('libcurl', disabler: true, required: get_option('curl')) + curl_dep = dependency('libcurl', required: get_option('curl')) + web_dep = declare_dependency(dependencies: [curl_dep]) + deps += web_dep else - curl_dep = dependency('', disabler: true, required: false) -endif - -if curl_dep.found() - deps += curl_dep + web_dep = dependency('', disabler: true, required: false) + curl_dep = web_dep endif expat_dep = dependency('expat', disabler: true, required: get_option('xmp')) @@ -118,7 +117,7 @@ cdata.set('EXV_HAVE_XMP_TOOLKIT', expat_dep.found()) cdata.set('EXV_HAVE_BROTLI', brotli_dep.found()) cdata.set('EXV_HAVE_ICONV', iconv_dep.found()) cdata.set('EXV_HAVE_LIBZ', zlib_dep.found()) -cdata.set('EXV_ENABLE_WEBREADY', get_option('webready')) +cdata.set('EXV_ENABLE_WEBREADY', web_dep.found()) cdata.set('EXV_USE_CURL', curl_dep.found()) cdata.set('EXV_ENABLE_NLS', intl_dep.found()) @@ -156,7 +155,7 @@ executable( samples = { 'addmoddel': [], - 'conntest': curl_dep, + 'conntest': web_dep, 'convert-test': [], 'easyaccess-test': [], 'exifcomment': [],