[CMake] CMake and OSX 10.5

Sean McBride sean at rogue-research.com
Wed Jan 23 20:32:35 EST 2008


On 1/23/08 2:36 PM, Ted Berg said:

>>> 2. When I don't run into issue #1 and am building against the 10.4u 
>>> SDK I get the following linker error:
>>>
>>> ld: library not found for -ldylib1.10.5.o
>>> collet2: ld returned 1 exit status
>
>Fix for #2:
>export MACOSX_DEPLOYMENT_TARGET=10.4
>
>It seems that you have to do more than just set the sysroot to choose a 
>target SDK.

That is a correct fix for your problem.  Another is to pass -mmin-macosx-
version=10.4 in cflags.  However, your statement "you have to do more
than just set the sysroot to choose a target SDK" is false. 
CMAKE_OSX_SYSROOT is all you need to set the SDK.  The deployment is a
totally separate setting.  It is possible, common in fact, to use for
example the 10.5 SDK, but a deployment target of 10.3.  This is how you
control weak linking.

I strongly feel CMake should include a CMAKE_OSX_DEPLOYMENT_TARGET.  I
invite you to look at this bug, and add any thoughts:
<http://public.kitware.com/Bug/view.php?id=6195>

-- 
____________________________________________________________
Sean McBride, B. Eng                 sean at rogue-research.com
Rogue Research                        www.rogue-research.com 
Mac Software Developer              Montréal, Québec, Canada



More information about the CMake mailing list