build: consolidate lcms2 dependencies

It's bad form to set the same variable in multiple places, and not all
of them were even equivalent.

Move lcms2 finding to the root level build file only. It is still an
optional dependency like before, and the if-not-found checks are still
in place where actually needed.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
dev
Pekka Paalanen 2 years ago committed by Pekka Paalanen
parent 6234cb98d1
commit 7fa9b15348
  1. 5
      compositor/meson.build
  2. 1
      libweston/color-lcms/meson.build
  3. 2
      meson.build
  4. 1
      tests/meson.build

@ -97,18 +97,17 @@ if get_option('screenshare')
endif
if get_option('color-management-lcms')
config_h.set('HAVE_LCMS', '1')
srcs_lcms = [
'cms-static.c',
'cms-helper.c',
]
dep_lcms2 = dependency('lcms2', required: false)
if not dep_lcms2.found()
error('cms-static requires lcms2 which was not found. Or, you can use \'-Dcolor-management-lcms=false\'.')
endif
config_h.set('HAVE_LCMS', '1')
plugin_lcms = shared_library(
'cms-static',
srcs_lcms,

@ -2,7 +2,6 @@ if not get_option('color-management-lcms')
subdir_done()
endif
dep_lcms2 = dependency('lcms2', version: '>= 2.9', required: false)
if not dep_lcms2.found()
error('color-lcms plugin requires lcms2 which was not found. Or, you can use \'-Dcolor-management-lcms=false\'.')
endif

@ -158,6 +158,8 @@ if dep_libdrm_version.version_compare('>=2.4.107')
config_h.set('HAVE_HUMAN_FORMAT_MODIFIER', '1')
endif
dep_lcms2 = dependency('lcms2', version: '>= 2.9', required: false)
prog_python = import('python').find_installation('python3')
files_xxd_py = files('tools/xxd.py')
cmd_xxd = [ prog_python, files_xxd_py, '@INPUT@', '@OUTPUT@' ]

@ -239,7 +239,6 @@ if get_option('renderer-gl')
endif
if get_option('color-management-lcms')
dep_lcms2 = dependency('lcms2', version: '>= 2.9', required: false)
if not dep_lcms2.found()
error('color-management-lcms tests require lcms2 which was not found. Or, you can use \'-Dcolor-management-lcms=false\'.')
endif

Loading…
Cancel
Save