<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">Hi,<DIV><BR class="khtml-block-placeholder"></DIV><DIV>I am using cmake from cvs and I have no problems getting it to create makefiles that automatically produce .app bundles.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Here is a modified version of the Rendering demos CMakeLists.txt file</DIV><DIV>                                ------------------------------------------------------------------</DIV><DIV><FONT class="Apple-style-span" face="Courier" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">PROJECT (Rendering)</SPAN></FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;"><BR class="khtml-block-placeholder"></SPAN></FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">FIND_PACKAGE(VTK REQUIRED)</SPAN></FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">IF(NOT VTK_USE_RENDERING)</SPAN></FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">  MESSAGE(FATAL_ERROR "Example ${PROJECT_NAME} requires VTK_USE_RENDERING.")</SPAN></FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">ENDIF(NOT VTK_USE_RENDERING)</SPAN></FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">INCLUDE(${VTK_USE_FILE})</SPAN></FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;"><BR class="khtml-block-placeholder"></SPAN></FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;"><BR class="khtml-block-placeholder"></SPAN></FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">ADD_EXECUTABLE(Cylinder MACOSX_BUNDLE Cylinder.cxx)</SPAN></FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">TARGET_LINK_LIBRARIES(Cylinder vtkRendering "-framework Carbon")</SPAN></FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;"><BR class="khtml-block-placeholder"></SPAN></FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">ADD_EXECUTABLE(SpecularSpheres MACOSX_BUNDLE SpecularSpheres.cxx)</SPAN></FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">TARGET_LINK_LIBRARIES(SpecularSpheres vtkRendering "-framework Carbon")</SPAN></FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;"><BR class="khtml-block-placeholder"></SPAN></FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">ADD_EXECUTABLE(DiffuseSpheres MACOSX_BUNDLE DiffuseSpheres.cxx)</SPAN></FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">TARGET_LINK_LIBRARIES(DiffuseSpheres vtkRendering "-framework Carbon")</SPAN></FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;"><BR class="khtml-block-placeholder"></SPAN></FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">ADD_EXECUTABLE(AmbientSpheres MACOSX_BUNDLE AmbientSpheres.cxx)</SPAN></FONT></DIV><DIV><FONT class="Apple-style-span" face="Courier" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">TARGET_LINK_LIBRARIES(AmbientSpheres vtkRendering "-framework Carbon")</SPAN></FONT></DIV><DIV>                        ---------------------------------------------</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Basically it is just a adding the MACOSX_BUNDLE and linking against the carbon framework.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>If you want to have slightly nicer app bundles you can also use the SET command with MACOSX_BUNDLE_INFO_STRING, and MACOSX_BUNDLE_ICON_FILE - and probably a few others.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Note that I have only ever worked with the carbon stuff and not cocoa+vtk. However, if you are not planning to link in any cocoa/objective c specific stuff then working with cocoa just seems like extra trouble.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I had a look at the bug linked from Sean's bug that says the MACOSX_BUNDLE stuff doesn't work and it looks like it is only about the XCode generator part - which I must concur does not work. However, if you just want to build .app bundles with make then there is no problem. I suspect that it will be a long time before the XCode generation is solved. In the past I have found that it works sufficiently well to have two directories in which you run cmake one of which generates makefiles and the other an xcode project - then you can edit away in xcode then go to the terminal and compile the make files. Having said that, now I just create my own XCode project for developing of OSX then I make a CMakeLists file so that it will build on other platforms.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Hope that helps,</DIV><DIV>Chris</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>PS Some of the demos seem to need to be clicked on before you see any graphics.</DIV><DIV><BR><DIV><DIV>On Jul 14, 2005, at 9:53 AM, P Bai wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Thanks both of you for the reply. It works now.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">P</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">--- Sean McBride &lt;<A href="mailto:sean@rogue-research.com">sean@rogue-research.com</A>&gt; wrote:</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV> <BR><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">On 2005-07-14 11:39, Kalpathi Subramanian said:</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV> <BR><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">On OSX, you need to build it as a "Mac</DIV> <BR></BLOCKQUOTE><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Application". This</DIV> <BR><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">is what little I know (I am very new to OSX, as</DIV> <BR></BLOCKQUOTE><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">well):</DIV> <BR><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">If your executable is called Cone, then create</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">the following tree of directories:</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Cone.app/Contents/MacOS/Cone</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">where the last Cone is the executable. Then the Mac</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">understands this is an application (or you can</DIV> <BR></BLOCKQUOTE><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">simply</DIV> <BR><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">execute the it by typing in the above path from</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">a terminal. Once you do this, all events are</DIV> <BR></BLOCKQUOTE><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">properly</DIV> <BR><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">recognized and handled.</DIV> <BR></BLOCKQUOTE><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">That's exactly right.<SPAN class="Apple-converted-space">  </SPAN>The thing is that on Mac OS X</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">command line</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">applications (like the vtk samples) cannot have a</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">GUI (that is, they</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">cannot bring up windows).<SPAN class="Apple-converted-space">  </SPAN>vtk tries anyway.<SPAN class="Apple-converted-space">  </SPAN>And as</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">you see it sorta</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">works, the window appears, but is broken in many</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">ways.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">I wrote up a bug for this, and encourage you to vote</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">for it: :)</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV> <BR></BLOCKQUOTE><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">&lt;<A href="http://www.vtk.org/Bug/bug.php?op=show&bugid=2025&pos=4">http://www.vtk.org/Bug/bug.php?op=show&amp;bugid=2025&amp;pos=4</A>&gt;</DIV> <BR><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">The bug has some links to the details, if it</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">interests you.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">BTW, a better way to open GUI apps from terminal is:</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">open /path/to/MyApp.app</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">--</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV> <BR></BLOCKQUOTE><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">____________________________________________________________</DIV> <BR><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Sean McBride, B. Eng <SPAN class="Apple-converted-space">               </SPAN></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="mailto:sean@rogue-research.com">sean@rogue-research.com</A></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Rogue Research<SPAN class="Apple-converted-space">                       </SPAN></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">www.rogue-research.com</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Mac Software Developer<SPAN class="Apple-converted-space">              </SPAN>Montréal,</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Québec, Canada</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV> <BR></BLOCKQUOTE><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><P style="margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px"><SPAN class="Apple-converted-space"><SPAN class="Apple-converted-tab">        </SPAN></SPAN><BR class="khtml-block-placeholder"></P><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">____________________________________________________</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Start your day with Yahoo! - make it your home page<SPAN class="Apple-converted-space"> </SPAN></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="http://www.yahoo.com/r/hs">http://www.yahoo.com/r/hs</A><SPAN class="Apple-converted-space"> </SPAN></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">_______________________________________________</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">This is the private VTK discussion list.<SPAN class="Apple-converted-space"> </SPAN></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Please keep messages on-topic. Check the FAQ at: <A href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</A></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Follow this link to subscribe/unsubscribe:</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</A></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV> <BR class="Apple-interchange-newline"></BLOCKQUOTE></DIV><BR></DIV></BODY></HTML>