[vtkusers] vtk build for 10.3 and 10.4
Sean McBride
sean at rogue-research.com
Mon Jan 23 12:17:08 EST 2006
On 2006-01-20 17:41, Gavin W. Burris aka 86 said:
>What is the proper way to build VTK on the latest Mac OS X with Xcode?
>I want to build VTK and have it run on 10.3 and 10.4.
>
>I found this reference on Apple's developer site:
>http://developer.apple.com/documentation/DeveloperTools/Conceptual/
>cross_development/Using/chapter_3_section_2.html#//apple_ref/doc/uid/
>20002000-1114311-BABGCAAB
>
>It specifies using the "-isysroot" and "-syslibroot" options in CFLAGS
>and LDFLAGS to point to the SDK directory,
>"/Developer/SDKs/MacOSX10.3.0.sdk".
>
>and also to export the environment variable MACOSX_DEPLOYMENT_TARGET=10.3
>
>How would you stick this into VTK's cmake setup properly?
Well, there are several orthogonal things here:
1- the SDK you want to use
2- the minimum OS you want to support
3- the maximum OS you want to allow
You can use a newer SDK and still support older OSes. So in your case,
you need to set MACOSX_DEPLOYMENT_TARGET to 10.3 and
MAC_OS_X_VERSION_MAX_ALLOWED to 10.3. You can then either use the 10.3
or 10.4 SDK, either will work. (I recommend the 10.4 SDK).
See technote 2064:
<http://developer.apple.com/technotes/tn2002/tn2064.html>
and AvailabilityMacros.h
MAC_OS_X_VERSION_MAX_ALLOWED is a #define, so you put it in
CMAKE_CXX_FLAGS and CMAKE_C_FLAGS like so: -DMAC_OS_X_VERSION_MAX_ALLOWED=1030
MACOSX_DEPLOYMENT_TARGET is an environment variable, I'm not sure how to
set that with cmake. Anyone?
Also, be sure to use vtk 5, not 4.x!
--
____________________________________________________________
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 vtkusers
mailing list