[CMake] Newbie creating shared objects on Mac

Bill Hoffman bill.hoffman at kitware.com
Tue Jul 8 13:43:26 EDT 2008


Kai Sterker wrote:
> On Mon, Jul 7, 2008 at 9:39 PM, Gerrick Bivins
> <gbivins at objectreservoir.com> wrote:
> 
>> I realized I left out the fact that I'm using the swig module.
>> Sorry about that.
>> Does the SWIG_ADD_MODULE have a SWIG_ADD_LIBRARY equivalent?
> 
> It's the same for me, but it hasn't caused me any troubles so far.
> 
> [snip]
> [ 81%] Swig source
> Scanning dependencies of target _main
> [ 81%] Building CXX object
> src/py-wrappers/adonthell/CMakeFiles/_main.dir/py_mainPYTHON_wrap.o
> [ 82%] Building CXX object
> src/py-wrappers/adonthell/CMakeFiles/_main.dir/py_main.o
> Linking CXX shared module _main.so
> [snip]
> 
> I am not using the latest CMake, however (still happy with 2.4.7). So
> unless you have a specific issue (aside from a file extension that's
> atypical for a Mac shared library), I wouldn't bother.
Actually, this is typical for a shared module on the Mac.  Older macs 
made a distinction between linkable and loadable modules.  By convention 
loadable modules had the .so extension in many projects.

-Bill


More information about the CMake mailing list