[cmake-developers] SONAME on APPLE?
Stephen Kelly
steveire at gmail.com
Mon Jul 9 13:15:28 EDT 2012
Brad King wrote:
> On 07/09/2012 12:17 PM, Stephen Kelly wrote:
>> It seems that on APPLE, otool -D <the_lib> will output the "shared
>> library id name". I don't know for certain that it is the same thing (I
>> know very little about APPLE), but CMake seems to set that based on the
>> name of the library, the SOVERSION property, and the file suffix. So far
>> it seems similar to the SONAME reported by objdump on linux.
>
> They are basically the same thing. The shared library id or "install
> name"
> is copied at link time into the dependents. The dynamic linker uses the
> name to search for the library at runtime.
>
Ok.
>> I didn't find any way to create 'frameworks' with CMake, so I don't know
>> if there is even the concept of a SONAME when creating a 'framework' on
>> APPLE.
>
> See the FRAMEWORK target property.
Interesting. CMake creates Versions/ directories with the full version
string, instead of just the MAJOR_VERSION, as Qt does, but I guess that's
because of Qt's binary compatiblity policies.
More interesting is that cmake is generating an IMPORTED_SONAME of just
'cmakeqt' when I build the library as a framework (no full path, no version
number, no file extension). Is this a bug in CMake?
> Ideally the IMPORTED_SONAME should match the shared library id of
> the actual library file. That's what CMake wants to know.
Ok, thanks. I'll see if I can generate that.
Steve.
More information about the cmake-developers
mailing list