Skip to content

Commit 0e463f3

Browse files
bgilbertneheb
authored andcommitted
libtiff: set library version
Upstream canonically keeps this in configure.ac in current:revision:age format, and converts it to a version number in the cmake scripts. Mirror the cmake logic. Stop naming the library binary "libtiff4"; upstream doesn't do it.
1 parent b06b7c9 commit 0e463f3

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

subprojects/packagefiles/libtiff/libtiff/meson.build

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,12 @@ if host_machine.system() == 'windows'
6565
endif
6666

6767
tiff4_lib = library(
68-
'tiff4',
68+
'tiff',
6969
sources,
7070
install: true,
7171
dependencies: [m_dep, jbig_dep, jpeg_dep, lerc_dep, lzma_dep, webp_dep, zlib_dep, zstd_dep],
7272
vs_module_defs: 'libtiff.def',
73+
version: library_version,
7374
)
7475

7576
install_headers(

subprojects/packagefiles/libtiff/meson.build

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@ project(
44
version: files('VERSION'),
55
meson_version: '>=0.57.0',
66
)
7+
# calculate library version from configure.ac values
8+
libtiff_current = 6
9+
libtiff_revision = 1
10+
libtiff_age = 0
11+
library_version = '@0@.@1@.@2@'.format(
12+
libtiff_current - libtiff_age,
13+
libtiff_age,
14+
libtiff_revision
15+
)
716

817
cc = meson.get_compiler('c')
918
m_dep = cc.find_library('m', required: false)

0 commit comments

Comments
 (0)