[CMake] HOW DO I: Build VTK with CMake/ExternalProject_add against Qt with Cocoa on OS X?

Bill Hoffman bill.hoffman at kitware.com
Tue Apr 13 14:25:23 EDT 2010


Michael Wild wrote:
> On 13. Apr, 2010, at 16:19 , kent williams wrote:
> 
>> I've descended into a confusing morass of complicated CMake macros,
>> and I need help getting out!
>>
>> The situation is this:  I didn't have much trouble building VTK with
>> QT as long as I stuck with Carbon.  Now I'm running into some serious
>> problems (phantom dependencies on X11 libraries, for starters) when I
>> try to use QT/Cocoa -- which is necessary, according to my boss, to
>> build on OS X 10.6.
>>
>> So does anyone have a successful example of building VTK against QT
>> using ExternalProject?

I ran into this myself, and it was a bug in the CMake files for VTK. 
VTK should use the right Cocoa/Carbon that Qt was built with.  The fix 
for this was in ParaView.  I moved that fix into VTK.  So, VTK should do 
the right thing now.

Dave P. pointed to that code here:
VTK/CMakeLists:306

1.554        (hoffman  17-Mar-10):         SET(VTK_USE_CARBON OFF CACHE 
BOOL "Bu
ild VTK with Carbon" FORCE)
1.554        (hoffman  17-Mar-10):         SET(VTK_USE_COCOA ON CACHE


-Bill



More information about the CMake mailing list