diff --git a/amdgpu/meson.build b/amdgpu/meson.build index 679de94d..dd65fbb3 100644 --- a/amdgpu/meson.build +++ b/amdgpu/meson.build @@ -37,7 +37,7 @@ libdrm_amdgpu = library( include_directories : [inc_root, inc_drm], link_with : libdrm, dependencies : [dep_threads, dep_atomic_ops, dep_rt], - version : '1.0.0', + version : '1.@0@.0'.format(patch_ver), install : true, ) diff --git a/etnaviv/meson.build b/etnaviv/meson.build index b9650961..10861351 100644 --- a/etnaviv/meson.build +++ b/etnaviv/meson.build @@ -33,7 +33,7 @@ libdrm_etnaviv = library( c_args : libdrm_c_args, gnu_symbol_visibility : 'hidden', dependencies : [dep_threads, dep_rt, dep_atomic_ops], - version : '1.0.0', + version : '1.@0@.0'.format(patch_ver), install : true, ) diff --git a/exynos/meson.build b/exynos/meson.build index c87be6b1..6a790f49 100644 --- a/exynos/meson.build +++ b/exynos/meson.build @@ -26,7 +26,7 @@ libdrm_exynos = library( include_directories : [inc_root, inc_drm], link_with : libdrm, dependencies : [dep_threads], - version : '1.0.0', + version : '1.@0@.0'.format(patch_ver), install : true, ) diff --git a/freedreno/meson.build b/freedreno/meson.build index 1d1bd820..311f5794 100644 --- a/freedreno/meson.build +++ b/freedreno/meson.build @@ -46,7 +46,7 @@ libdrm_freedreno = library( include_directories : [inc_root, inc_drm], dependencies : [dep_valgrind, dep_threads, dep_rt, dep_atomic_ops], link_with : libdrm, - version : '1.0.0', + version : '1.@0@.0'.format(patch_ver), install : true, ) diff --git a/intel/meson.build b/intel/meson.build index e609449c..2aa9c288 100644 --- a/intel/meson.build +++ b/intel/meson.build @@ -32,7 +32,7 @@ libdrm_intel = library( dependencies : [dep_pciaccess, dep_threads, dep_rt, dep_valgrind, dep_atomic_ops], c_args : libdrm_c_args, gnu_symbol_visibility : 'hidden', - version : '1.0.0', + version : '1.@0@.0'.format(patch_ver), install : true, ) diff --git a/meson.build b/meson.build index 8fd0a196..7b26d7eb 100644 --- a/meson.build +++ b/meson.build @@ -18,6 +18,11 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. +# The versioning should always stay at 2.4.x. If bumping away from this, +# you must ensure that all users of patch_ver are changed such that DSO versions +# continuously increment (e.g. blindly bumping from 2.4.122 to 2.5.0 would +# roll the libdrm DSO versioning from libdrm.so.2.122.0 back to libdrm.so.2.0.0 +# which would be bad) project( 'libdrm', ['c'], @@ -27,6 +32,8 @@ project( default_options : ['buildtype=debugoptimized', 'c_std=c11'], ) +patch_ver = meson.project_version().split('.')[2] + if ['windows', 'darwin'].contains(host_machine.system()) error('unsupported OS: @0@'.format(host_machine.system())) endif @@ -256,7 +263,7 @@ libdrm_files = [files( if android libdrm_kw = {} else - libdrm_kw = {'version' : '2.4.0'} + libdrm_kw = { 'version' : '2.@0@.0'.format(patch_ver) } endif libdrm = library( diff --git a/nouveau/meson.build b/nouveau/meson.build index 71c8f552..ec28dd2d 100644 --- a/nouveau/meson.build +++ b/nouveau/meson.build @@ -27,7 +27,7 @@ libdrm_nouveau = library( include_directories : [inc_root, inc_drm], link_with : libdrm, dependencies : [dep_threads, dep_atomic_ops], - version : '2.0.0', + version : '2.@0@.0'.format(patch_ver), install : true, ) diff --git a/omap/meson.build b/omap/meson.build index 8856d4ab..8187825a 100644 --- a/omap/meson.build +++ b/omap/meson.build @@ -26,7 +26,7 @@ libdrm_omap = library( gnu_symbol_visibility : 'hidden', link_with : libdrm, dependencies : [dep_threads, dep_atomic_ops], - version : '1.0.0', + version : '1.@0@.0'.format(patch_ver), install : true, ) diff --git a/radeon/meson.build b/radeon/meson.build index 7aa9b705..bcf3239c 100644 --- a/radeon/meson.build +++ b/radeon/meson.build @@ -33,7 +33,7 @@ libdrm_radeon = library( include_directories : [inc_root, inc_drm], link_with : libdrm, dependencies : [dep_threads, dep_atomic_ops], - version : '1.0.1', + version : '1.@0@.0'.format(patch_ver), install : true, ) diff --git a/tegra/meson.build b/tegra/meson.build index 11ce217b..dfec91d0 100644 --- a/tegra/meson.build +++ b/tegra/meson.build @@ -31,7 +31,7 @@ libdrm_tegra = library( dependencies : [dep_threads, dep_atomic_ops], c_args : libdrm_c_args, gnu_symbol_visibility : 'hidden', - version : '0.0.0', + version : '0.@0@.0'.format(patch_ver), install : true, )