[CMake] VERSION and SOVERSION target properties on OS X

Clinton Stimpson clinton at elemtech.com
Mon Oct 13 11:50:29 EDT 2014


On Friday, October 10, 2014 12:43:53 PM Steven Velez wrote:
> Forgive me if this question has been answered before but with CMAKE 2.8.12
> (I believe) xcode builds on OS X started generating shared libraries
> decorated with the "VERSION" target property and symlinked by a bare dylib
> name and one decorated with the SOVERSION.
> 
> I understand this is common practice on many unixen, but it is complicating
> our deployment and update logic (not cpack, sorry to say).
> 
> Our application is fairly self-contained, so we would like to continue
> generating only those bare-named dylibs, but we need to keep the SOVERSION
> set to that the embedded "compatibility version" remains how we want it.
> 
> I have not found a combination of values to these properties that does what
> I would like, so I was wondering if there was a way to get the old
> behavior.... perhaps with a policy or something?
> 
> If there isn't a way to do it now, would there be an acceptable way to
> specify this behavior that would be accepted as a patch?
> 
> Thanks,
> Steven

That change was made to make the Xcode and Makefile generators consistent.

To get what you want now (with both the older and newer CMake versions), you 
can remove the SOVERSION property and set the LINK_FLAGS property to pass -
compatibilty_version to the linker.

Clint


More information about the CMake mailing list