binpac: Fix shared library versioning to agree with OpenBSD expectations

OpenBSD shared library names are like "libfoo.so.major.minor" and
binpac was previously letting the post-release number into the name
like "libbinpac.so.0.54-7", which isn't compatible with that scheme.

Related to https://github.com/zeek/zeek/issues/649
This commit is contained in:
Jon Siwek 2019-11-06 22:23:55 -08:00 committed by Tim Wojtulewicz
parent 8b4b74e54a
commit 3cba237e84

View file

@ -7,6 +7,7 @@ string(REPLACE "." " " _version_numbers ${BINPAC_VERSION})
separate_arguments(_version_numbers)
list(GET _version_numbers 0 BINPAC_VERSION_MAJOR)
list(GET _version_numbers 1 BINPAC_VERSION_MINOR)
string(REGEX REPLACE "-[0-9]*$" "" BINPAC_VERSION_MINOR ${BINPAC_VERSION_MINOR})
# The SO number shall increase only if binary interface changes.
set(BINPAC_SOVERSION 0)