From 3f766fa3d62352530fc57aeeb4c5cdf879ea87bc Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Tue, 19 Oct 2021 09:22:35 -0400 Subject: [PATCH] lcms2: Sync with upstream Meson build definition has been merged upstream but not released yet. --- releases.json | 1 + subprojects/packagefiles/lcms2/meson.build | 21 ++++++++++++++++----- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/releases.json b/releases.json index 43b4c6f27..3e98c706f 100644 --- a/releases.json +++ b/releases.json @@ -504,6 +504,7 @@ "lcms2" ], "versions": [ + "2.12-2", "2.12-1" ] }, diff --git a/subprojects/packagefiles/lcms2/meson.build b/subprojects/packagefiles/lcms2/meson.build index c5bc2592c..5d9b45ff3 100644 --- a/subprojects/packagefiles/lcms2/meson.build +++ b/subprojects/packagefiles/lcms2/meson.build @@ -1,6 +1,6 @@ project('Little-CMS', 'c', version: '2.12', - meson_version: '>=0.55.0', + meson_version: '>=0.48.0', ) library_version = '2.0.12' @@ -46,24 +46,35 @@ inc_dirs = include_directories('include') deps = [ cc.find_library('m', required: false), dependency('threads'), - dependency('zlib'), - dependency('libtiff-4'), ] -cargs = ['-DHasTHREADS=1', '-DHasZLIB=1', '-DHasTIFF=1'] +cargs = ['-DHasTHREADS=1'] -if cc.has_argument('-fvisibility') +# Check for threadsafe variants of gmtime +if cc.has_function('gmtime_r', prefix: '#include ') + cargs += '-DHAVE_GMTIME_R=1' +elif cc.has_function('gmtime_s', prefix: '#include ') + cargs += '-DHAVE_GMTIME_S=1' +endif + +if cc.has_function_attribute('visibility:hidden') cargs +='-DHAVE_FUNC_ATTRIBUTE_VISIBILITY=1' elif cc.get_id() == 'msvc' cargs += '-DCMS_DLL_BUILD=1' endif +if host_machine.system() == 'windows' + win = import('windows') + lcms2_srcs += win.compile_resources('Projects/VC2019/lcms2.rc') +endif + liblcms2_lib = library('lcms2', lcms2_srcs, include_directories : inc_dirs, gnu_symbol_visibility: 'hidden', dependencies: deps, c_args: cargs, version: library_version, + vs_module_defs: 'src/lcms2.def', install: true, )