diff --git a/compositor/meson.build b/compositor/meson.build index 427167e7..eb3c9de5 100644 --- a/compositor/meson.build +++ b/compositor/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, diff --git a/libweston/color-lcms/meson.build b/libweston/color-lcms/meson.build index 86e2871f..4aefd4b3 100644 --- a/libweston/color-lcms/meson.build +++ b/libweston/color-lcms/meson.build @@ -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 diff --git a/meson.build b/meson.build index 47324bd8..994c7a56 100644 --- a/meson.build +++ b/meson.build @@ -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@' ] diff --git a/tests/meson.build b/tests/meson.build index 388dcc9a..4dfd57e9 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -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