Skip to content

Set version, soversion from cmake if available #14682

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

julianneswinoga
Copy link

This is a pretty basic thing that we should be pulling in from cmake

@bonzini bonzini added the module:cmake Issues related to the cmake module, including cmake.subproject label Jun 6, 2025
@jpakkane
Copy link
Member

jpakkane commented Jun 6, 2025

mesonbuild.interpreterbase.exceptions.InterpreterException: Assert failed: Shared library version not picked up correctly

Maybe because setting version/soversion changes the output file name?

@julianneswinoga
Copy link
Author

I added that assert to double check that the cmake-meson interop is setting the version correctly. On Linux the shared library version is just appended to the filename (libcmModLib.so.1.0.1) so I can just check the target path ends with the version. On other OSs that seems to not be the case. I can either make the assert for Linux-only builders, or do some research to see how shared libraries are version tagged on other OSs.

This is only because I don't see a way to get a version from a target object, if there's a nicer way I'd love to use that 😁

Change test case assertion depending on host system
Fix MacOS preferring soversion over version, bool
@julianneswinoga
Copy link
Author

Changed the test case assertion to be dependent on the host system.

Interestingly I also found that on Windows-Cygwin meson will name the library cygcmModLib-1.dll but cmake will name it cygcmModLib.dll 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module:cmake Issues related to the cmake module, including cmake.subproject
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants