mattgodbolt / seasocks

Simple, small, C++ embeddable webserver with WebSockets support
BSD 2-Clause "Simplified" License
724 stars 120 forks source link

versioned shared library #153

Closed Jasper-Ben closed 3 years ago

Jasper-Ben commented 3 years ago

this commit adds versioning to libseasocks.so

before: /usr/local/lib/ |-- libseasocks.so

after: /usr/local/lib/ |-- libseasocks.so -> libseasocks.so.1.4.4 |-- libseasocks.so.1.4.4

codecov[bot] commented 3 years ago

Codecov Report

Merging #153 (18862a0) into master (90239b0) will not change coverage. The diff coverage is n/a.

:exclamation: Current head 18862a0 differs from pull request most recent head 703884d. Consider uploading reports for the commit 703884d to get more accurate results Impacted file tree graph

@@           Coverage Diff           @@
##           master     #153   +/-   ##
=======================================
  Coverage   35.92%   35.92%           
=======================================
  Files          52       52           
  Lines        2280     2280           
=======================================
  Hits          819      819           
  Misses       1461     1461           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 90239b0...703884d. Read the comment docs.

offa commented 3 years ago

Seems the versioning got lost in #143 (previously added by #77 / #78).

offa commented 3 years ago

Maybe it's a stupid question: But shouldn't the SO version only get set when building a SO? Or is it ignored on static build anyway?

Jasper-Ben commented 3 years ago

Maybe it's a stupid question: But shouldn't the SO version only get set when building a SO? Or is it ignored on static build anyway?

I would assume, that it gets ignored and it seems to have worked previously with https://github.com/mattgodbolt/seasocks/pull/78

Jasper-Ben commented 3 years ago

Maybe it's a stupid question: But shouldn't the SO version only get set when building a SO? Or is it ignored on static build anyway?

Actually, we could omit the SOVERSION, if that is cause for confusion:

"For shared libraries VERSION and SOVERSION can be used to specify the build version and API version respectively. [...] If only one of both is specified the missing is assumed to have the same version number." - https://cmake.org/cmake/help/latest/prop_tgt/SOVERSION.html

madebr commented 3 years ago

Only shared libraries are mentioned at https://cmake.org/cmake/help/latest/prop_tgt/SOVERSION.html and https://cmake.org/cmake/help/latest/prop_tgt/VERSION.html

offa commented 3 years ago

Ok, thanks!

offa commented 3 years ago

Anything left @Jasper-Ben @madebr? Otherwise we can merge I guess :+1: .

madebr commented 3 years ago

I think the SOVERSION can be dropped as there is no backwards compatibility contract. See https://en.wikipedia.org/wiki/Soname

Jasper-Ben commented 3 years ago

ok, I did a quick squash. Feel free to merge (assuming Seasocks_VERSION works, did not test).

offa commented 3 years ago

Thanks @Jasper-Ben !