[CMake] *.so on Mac

Bill Hoffman bill.hoffman at kitware.com
Wed Sep 7 13:51:18 EDT 2011


On 9/7/2011 11:43 AM, Sean McBride wrote:

>> Because a MODULE is normally a "plugin" library, and these
>> traditionally have the extension .so on Mac.
>
> Do they?
>
> I just searched all of /System and the only .so I find are in
Python.framework. I've been using Macs since the early 90s, I don't
recall any tradition of using .so for anything, but could be wrong...

http://stackoverflow.com/questions/2339679/what-are-the-differences-between-so-and-dylib-on-osx

"The extension .bundle is recommended by Apple, but most ported software 
uses .so for the sake of compatibility. "


So, early on in OSX dev for CMake, this seemed like what most 
applications were doing.  It seems that basically it comes down to this:

- if you want to link with it, it ends in .dylib

- if you want to dlopen it, it can be called anything you want. 
However, many UNIX applications like php, python, have code that expects 
a .so extension for loaded modules, so that is the easy path for CMake.

You can of course change it in CMake with a target property.  I don't 
think we will be changing this in CMake as I am sure it would break at 
least ParaView, VTK, and ITK.

-Bill


More information about the CMake mailing list