[vtkusers] vtk build for 10.3 and 10.4
Gavin W. Burris aka 86
ga5in at psu.edu
Tue Jan 24 16:17:59 EST 2006
My goal is to build VTK with Tcl wrappings that will run on 10.3.9 or
better.
I was able to build on Mac OS X 10.4.2 + Xcode 2.2 with the CVS version
of VTK. I added "-DMAC_OS_X_VERSION_MIN_REQUIRED=1039" to
CMAKE_CXX_FLAGS and CMAKE_C_FLAGS. This builds a version that will run
fine on OS X 10.3.9, but not on 10.4.2. When running the Medical1.tcl
example on 10.4.2, the Carbon window will appear, but just spin/wait
with no graphics ever appearing.
Do I have to also define "-DMAC_OS_X_VERSION_MAX_ALLOWED=????"?
Shouldn't just setting the minimum version also support newer versions?
Cheers.
Sean McBride wrote:
> 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!
>
--
Gavin W. Burris aka 86
Senior Systems Programmer
Penn State Visualization Group
http://viz.aset.psu.edu/ga5in
More information about the vtkusers
mailing list