Skip to content

Commit

Permalink
lcms2: Sync with upstream
Browse files Browse the repository at this point in the history
Meson build definition has been merged upstream but not released yet.
  • Loading branch information
xclaesse authored and eli-schwartz committed Oct 24, 2021
1 parent 5c68aab commit 3f766fa
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
1 change: 1 addition & 0 deletions releases.json
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,7 @@
"lcms2"
],
"versions": [
"2.12-2",
"2.12-1"
]
},
Expand Down
21 changes: 16 additions & 5 deletions subprojects/packagefiles/lcms2/meson.build
Original file line number Diff line number Diff line change
@@ -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'
Expand Down Expand Up @@ -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 <time.h>')
cargs += '-DHAVE_GMTIME_R=1'
elif cc.has_function('gmtime_s', prefix: '#include <time.h>')
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,
)

Expand Down

0 comments on commit 3f766fa

Please sign in to comment.