<div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial"><DIV>John £¬Thank you for your reply<BR>&nbsp;&nbsp;&nbsp;&nbsp; I have already built VTK&nbsp; .&nbsp; But&nbsp; how to use cmake to build MFC projects still do not understand.</DIV>
<DIV>&nbsp;&nbsp;&nbsp; 1.Suppose I have established the MFC single document project. This is&nbsp; name" VTK_ext". Delete&nbsp; VTK_ext.sln&nbsp; and VTK_ext.ncb</DIV>
<DIV>&nbsp;&nbsp;&nbsp; 2.To find a file&nbsp; ,its name is CMakeLists.txt&nbsp; in VTK&nbsp; DIR&nbsp; (D:\vtk\vtk\Examples\GUI\Win32\vtkMFC\vtkSDI),</DIV>
<DIV>and modify this file. ( VTK_ext&nbsp; instead of&nbsp; vtkSDI ) . </DIV>
<DIV>&nbsp;&nbsp; 3.start Cmake.&nbsp; soure code : "D:/Documents/Visual Studio 2008/Projects/VTK_ext"&nbsp;&nbsp; (CMakeLists.txt&nbsp; copy of this folder)</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; build&nbsp; the&nbsp; binaries: "D:/Documents/Visual Studio 2008/Projects/VTK_ext/VTK_ext"</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp; configure---&gt; Generate---&gt;</DIV>
<DIV>&nbsp; 4. Use&nbsp; vc2008 to open&nbsp; VTK_ext.sln&nbsp;&nbsp;&nbsp; ,&nbsp; press&nbsp; F5 ,Pop-up window&nbsp;&nbsp; (title is Executable For Debug Session)</DIV>
<DIV>&nbsp;&nbsp; The above method which is not correct, please advice! </DIV>
<DIV>&nbsp;&nbsp;&nbsp; alice</DIV>
<DIV></DIV>
<DIV id="divNeteaseMailCard"></DIV>
<DIV><BR></DIV><PRE><BR>At&nbsp;2013-03-06&nbsp;20:04:26,"John&nbsp;Drescher"&nbsp;&lt;drescherjm@gmail.com&gt;&nbsp;wrote:
&gt;On&nbsp;Wed,&nbsp;Mar&nbsp;6,&nbsp;2013&nbsp;at&nbsp;6:09&nbsp;AM,&nbsp;Jon&nbsp;Haitz&nbsp;Legarreta
&gt;&lt;jhlegarreta@vicomtech.org&gt;&nbsp;wrote:
&gt;&gt;&nbsp;Hi&nbsp;there,
&gt;&gt;&nbsp;if&nbsp;you&nbsp;have&nbsp;already&nbsp;built&nbsp;VTK&nbsp;and&nbsp;you&nbsp;are&nbsp;looking&nbsp;for&nbsp;a&nbsp;way&nbsp;to&nbsp;use&nbsp;and&nbsp;link
&gt;&gt;&nbsp;a&nbsp;project&nbsp;of&nbsp;your&nbsp;own&nbsp;agains&nbsp;VTK,&nbsp;this&nbsp;is&nbsp;a&nbsp;good&nbsp;starting&nbsp;point:
&gt;&gt;&nbsp;http://www.vtk.org/Wiki/VTK/Tutorials/CMakeListsFile
&gt;&gt;
&gt;&gt;&nbsp;If&nbsp;you&nbsp;have&nbsp;not&nbsp;built&nbsp;VTK&nbsp;yet,&nbsp;this&nbsp;may&nbsp;be&nbsp;useful:
&gt;&gt;&nbsp;http://www.vtk.org/Wiki/VTK/Building
&gt;&gt;
&gt;&gt;&nbsp;When&nbsp;you&nbsp;run&nbsp;CMake,&nbsp;it&nbsp;will&nbsp;ask&nbsp;which&nbsp;compiler&nbsp;you&nbsp;will&nbsp;be&nbsp;using,&nbsp;and&nbsp;that
&gt;&gt;&nbsp;is&nbsp;where&nbsp;you&nbsp;will&nbsp;choose&nbsp;MS&nbsp;VS2008.
&gt;&gt;
&gt;&gt;&nbsp;It&nbsp;is&nbsp;highly&nbsp;recommended&nbsp;to&nbsp;use&nbsp;CMake&nbsp;because&nbsp;it&nbsp;will&nbsp;save&nbsp;you&nbsp;time&nbsp;in&nbsp;the
&gt;&gt;&nbsp;project&nbsp;configuration&nbsp;process.
&gt;&gt;
&gt;
&gt;I&nbsp;also&nbsp;(as&nbsp;a&nbsp;long&nbsp;time&nbsp;windows&nbsp;developer)&nbsp;highly&nbsp;recommend&nbsp;using&nbsp;CMake
&gt;for&nbsp;project&nbsp;generation&nbsp;especially&nbsp;with&nbsp;Visual&nbsp;Studio.&nbsp;One&nbsp;of&nbsp;the
&gt;biggest&nbsp;benefits&nbsp;is&nbsp;that&nbsp;it&nbsp;greatly&nbsp;simplifies&nbsp;the&nbsp;project
&gt;configuration&nbsp;process&nbsp;with&nbsp;large&nbsp;libraries&nbsp;like&nbsp;vtk&nbsp;that&nbsp;have&nbsp;dozens
&gt;to&nbsp;hundreds&nbsp;of&nbsp;modules.&nbsp;It&nbsp;also&nbsp;makes&nbsp;it&nbsp;very&nbsp;simple&nbsp;to&nbsp;switch
&gt;compilers&nbsp;or&nbsp;to&nbsp;build&nbsp;the&nbsp;same&nbsp;source&nbsp;with&nbsp;multiple&nbsp;compilers&nbsp;at&nbsp;the
&gt;same&nbsp;time.&nbsp;I&nbsp;recommend&nbsp;using&nbsp;a&nbsp;totally&nbsp;independent&nbsp;build&nbsp;tree&nbsp;from&nbsp;the
&gt;source&nbsp;tree&nbsp;to&nbsp;facilitate&nbsp;this.&nbsp;On&nbsp;to&nbsp;of&nbsp;this&nbsp;CMake&nbsp;supports&nbsp;packaging
&gt;with&nbsp;nsis&nbsp;and&nbsp;the&nbsp;builtin&nbsp;unit&nbsp;testing.&nbsp;I&nbsp;find&nbsp;these&nbsp;extremely&nbsp;useful
&gt;for&nbsp;my&nbsp;projects.&nbsp;These&nbsp;are&nbsp;just&nbsp;a&nbsp;few&nbsp;of&nbsp;the&nbsp;added&nbsp;benefits&nbsp;of&nbsp;using
&gt;CMake.&nbsp;I&nbsp;could&nbsp;not&nbsp;possibly&nbsp;list&nbsp;all&nbsp;in&nbsp;a&nbsp;single&nbsp;email..
&gt;
&gt;John
</PRE></div><br><br><span title="neteasefooter"><span id="netease_mail_footer"></span></span>