diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2018-08-28 15:17:00 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek.chauhan@gmail.com> | 2018-08-29 15:51:23 -0700 |
commit | bead8287a5c047f31e6efe5c49039278341ae46c (patch) | |
tree | 28c54758068db7d900a2060d4d229454ccc09c45 /test cases/osx | |
parent | b86f2fd17f1f0825e16b1df2b1f3f598c0d77b85 (diff) | |
download | meson-bead8287a5c047f31e6efe5c49039278341ae46c.zip meson-bead8287a5c047f31e6efe5c49039278341ae46c.tar.gz meson-bead8287a5c047f31e6efe5c49039278341ae46c.tar.bz2 |
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/osx')
-rw-r--r-- | test cases/osx/2 library versions/installed_files.txt | 2 | ||||
-rw-r--r-- | test cases/osx/2 library versions/meson.build | 17 |
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 de7b078..f9c629b 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 acd58a5..26f945a 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. |