Re: [CMake] *.so on Mac

2011-09-07 Thread Sean McBride
On Mon, 5 Sep 2011 06:49:45 +0200, Michael Wild said:

 Shouldn't dynamic libraries on Mac have dylib as their extension? 

 Why does MyLib have an extension so when I use add_library(MyLib MODULE)?

 Thanks

 Yifei

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...

-- 

Sean McBride, B. Eng s...@rogue-research.com
Rogue Researchwww.rogue-research.com 
Mac Software Developer  Montréal, Québec, Canada


___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] *.so on Mac

2011-09-07 Thread Bill Hoffman

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
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] *.so on Mac

2011-09-04 Thread Michael Wild
On Sun 04 Sep 2011 11:14:45 PM CEST, Yifei Li wrote:
 Hi all,

 Shouldn't dynamic libraries on Mac have dylib as their extension? 

 Why does MyLib have an extension so when I use add_library(MyLib MODULE)?

 Thanks

 Yifei

Because a MODULE is normally a plugin library, and these 
traditionally have the extension .so on Mac. If you create a SHARED 
library, you will get a .dylib. If you don't agree with that choice, 
you can override it with either the SUFFIX target property or by 
setting the CMAKE_SHARED_LIBRARY_SUFFIX or the 
CMAKE_SHARED_MODULE_SUFFIX variable.

HTH

Michael
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake