[CMAKE] Use proper version numbers for the shared libraries
Summary:
The shared libraries used to have 0.0.0 as a version number as it was
the value set for the autotools build.
This diff sets the correct version number and name the files the usual
way depending on the platform (cmake defaults).
The result is as follow for a lib lib (M=major, m=minor, p=patch):
- Linux: lib.so (symlink) => lib.so.M (symlink) => lib.so.M.m.p
- OSX: lib.dylib (symlink) => lib.dylib.M (symlink) => lib.dylib.M.m.p
- Windows: lib.dll with embededd version info.
Depends on D7569.
Test Plan:
For each platform:
ninja
Check the libbitcoinconsensus library version and name is compliant with
the above definition.
Reviewers: #bitcoin_abc, deadalnix
Reviewed By: #bitcoin_abc, deadalnix
Differential Revision: https://reviews.bitcoinabc.org/D7570