Added versioning for shared libraries.
Description
Hello everyone. I am the maintainer of the ALT Linux distribution (https://www.basealt.ru/en ).
A message has appeared in our error tracking system that eigen3 does not comply with the shared library packaging policy. This is due to the fact that eigen3 is built with the options EIGEN_BUILD_BLAS=ON and EIGEN_BUILD_LAPACK=ON. And libraries have the form libeigen_blas.so and libeigen_lapack.so instead of libeigen_blas.so.5.0.1 and libeigen_lapack.so.5.0.1 (for now).
I described in more detail the reasons for the change and what was changed in the description of the commit.
If for some reason these libraries should not follow the shared library build policy, please write to me about it. I have just started to accompany this package to Alt, and I may be mistaken.
Unfortunately, our policy is currently available only in Russian.: https://www.altlinux.org/Shared_Libs_Policy
But one is identical to the policies in other distributions, because this is the generally accepted approach to packaging shared libraries in the Linux world.
https://docs.fedoraproject.org/en-US/packaging-guidelines/#_shared_libraries
https://www.debian.org/doc/debian-policy/ch-sharedlibs.html
Reference issue
Additional information
According to the packaging policies for shared libraries in Linux, shared libraries should look like this: libfoo.so.{MAJOR}.{MINOR}.${PATCH}
The following symlinks to this library should also be created: libfoo.so .{MAJOR} -> libfoo.so .{MAJOR}.{MINOR}.{PATCH} libfoo.so -> libfoo.so .{MAJOR}.{MINOR}.${PATCH}
In this case, the libfoo library package contains the following files: The library itself: libfoo.so .{MAJOR}.{MINOR}.{PATCH} As well as a symlink to it, which contains the library name and the ABI version.: libfoo.so.{MAJOR}
The following symlink is placed in the libfoo-devel package: libfoo.so
This is the standard packaging method for many distributions. Look: https://docs.fedoraproject.org/en-US/packaging-guidelines/#_shared_libraries https://www.debian.org/doc/debian-policy/ch-sharedlibs.html
Currently, when using the cmake options EIGEN_BUILD_BLAS=ON and EIGEN_BUILD_LAPACK=ON, libraries are being built libeigen_blas.so and libeigen_lapack.so . They do not have an ABI specific, which is not suitable for packaging these libraries in distributions without violating the policy.