summaryrefslogtreecommitdiff
path: root/test cases
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2018-08-28 15:17:00 +0530
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2018-08-29 15:51:23 -0700
commitbead8287a5c047f31e6efe5c49039278341ae46c (patch)
tree28c54758068db7d900a2060d4d229454ccc09c45 /test cases
parentb86f2fd17f1f0825e16b1df2b1f3f598c0d77b85 (diff)
downloadmeson-bead8287a5c047f31e6efe5c49039278341ae46c.tar.gz
Improve support for macOS dylib versioning
We now use the soversion to set compatibility_version and current_version by default. This is the only sane thing we can do by default because of the restrictions on the values that can be used for compatibility and current version. Users can override this value with the `darwin_versions:` kwarg, which can be a single value or a two-element list of values. The first one is the compatibility version and the second is the current version. Fixes https://github.com/mesonbuild/meson/issues/3555 Fixes https://github.com/mesonbuild/meson/issues/1451
Diffstat (limited to 'test cases')
-rw-r--r--test cases/osx/2 library versions/installed_files.txt2
-rw-r--r--test cases/osx/2 library versions/meson.build17
2 files changed, 17 insertions, 2 deletions
diff --git a/test cases/osx/2 library versions/installed_files.txt b/test cases/osx/2 library versions/installed_files.txt
index de7b078dc..f9c629b4e 100644
--- a/test cases/osx/2 library versions/installed_files.txt
+++ b/test cases/osx/2 library versions/installed_files.txt
@@ -1,5 +1,5 @@
usr/lib/libsome.dylib
-usr/lib/libsome.0.dylib
+usr/lib/libsome.7.dylib
usr/lib/libnoversion.dylib
usr/lib/libonlyversion.dylib
usr/lib/libonlyversion.1.dylib
diff --git a/test cases/osx/2 library versions/meson.build b/test cases/osx/2 library versions/meson.build
index acd58a50b..26f945a77 100644
--- a/test cases/osx/2 library versions/meson.build
+++ b/test cases/osx/2 library versions/meson.build
@@ -8,7 +8,7 @@ some = shared_library('some', 'lib.c',
build_rpath : zlib_dep.get_pkgconfig_variable('libdir'),
dependencies : zlib_dep,
version : '1.2.3',
- soversion : '0',
+ soversion : '7',
install : true)
noversion = shared_library('noversion', 'lib.c',
@@ -23,6 +23,21 @@ onlysoversion = shared_library('onlysoversion', 'lib.c',
soversion : 5,
install : true)
+shared_library('intver', 'lib.c',
+ darwin_versions : 2)
+
+shared_library('stringver', 'lib.c',
+ darwin_versions : '2.3')
+
+shared_library('stringlistver', 'lib.c',
+ darwin_versions : ['2.4'])
+
+shared_library('intstringver', 'lib.c',
+ darwin_versions : [1111, '2.5'])
+
+shared_library('stringlistvers', 'lib.c',
+ darwin_versions : ['2.6', '2.6.1'])
+
# Hack to make the executables below depend on the shared libraries above
# without actually adding them as `link_with` dependencies since we want to try
# linking to them with -lfoo linker arguments.