[CMake] Newbie creating shared objects on Mac

Bill Hoffman bill.hoffman at kitware.com
Mon Jul 7 15:25:39 EDT 2008


Alexander Neundorf wrote:
> On Monday 07 July 2008, Gerrick Bivins wrote:
>> Hello,
>> I¹m trying to dive into Cmake and I¹ve tried creating new targets for an
>> existing project using Cmake. So far everything
>> Works ok but on Mac, my shared object targets are creating *.so files. I¹m
>> not concerned about bundles and frameworks but
>> I expected Cmake to produce *.dylib files. Any suggestions?
> 
> Yes, usually it does.
> Which version of cmake is this ?
> Can you send a small test case ?
> 

add_library(foo MODULE foo.c) will create a .so on the mac.
add_library(foo SHARED foo.c) will create a .dylib

-Bill


More information about the CMake mailing list