In itkv4 only use ITK_LIBRARIES<br><br><div>target_link_libraries( image_read_write ### And here?</div><div> ${ITK_LIBRARIES}</div><div> itkCommon </div><div> itkIO </div><div> )<br>should be<br><div>target_link_libraries( image_read_write ### And here?</div>
<div> ${ITK_LIBRARIES}<br> )</div><br></div><br><br><div class="gmail_quote">On Thu, Jan 5, 2012 at 5:38 PM, Matt McCormick <span dir="ltr"><<a href="mailto:matt.mccormick@kitware.com">matt.mccormick@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Wenwu,<br>
<br>
To build against a specific version, set the CMake configuration<br>
variable, "ITK_DIR", to the path of the install or build for that<br>
version.<br>
<br>
Hope this helps,<br>
<br>
Matt<br>
<div><div></div><div class="h5"><br>
On Thu, Jan 5, 2012 at 5:06 PM, Wenwu <<a href="mailto:cool.wenwu@gmail.com">cool.wenwu@gmail.com</a>> wrote:<br>
> Hi everyone,<br>
><br>
> At the beginning, The ITK3.2 was installed in my computer(window7, visual<br>
> studio 2008 c++ express), then I installed the lastest version ITK4.0, so<br>
> now, how to write the CMakeLists? Maybe it is very easy! If you are free,<br>
> please tell me!! Thank you very much!<br>
><br>
><br>
> e.g,<br>
><br>
> cmake_minimum_required( VERSION 2.8 )<br>
> project( image_read_write )<br>
><br>
> find_package (ITK) ### here, because of two ITK version in my computer, how<br>
> to specify the specific one?<br>
> if (ITK_FOUND)<br>
> include ( ${ITK_USE_FILE} )<br>
> else (ITK_FOUND)<br>
> message (FATAL_ERROR "Cannot build without ITK, Please set ITK_DIR.")<br>
> endif (ITK_FOUND)<br>
><br>
> add_executable( image_read_write main.cxx )<br>
><br>
> target_link_libraries( image_read_write ### And here?<br>
> ${ITK_LIBRARIES}<br>
> itkCommon<br>
> itkIO<br>
> )<br>
><br>
><br>
><br>
><br>
> --<br>
> Wenwu Zhu<br>
> University of Strasbourg, France<br>
> Email address: <a href="mailto:cool.wenwu@gmail.com">cool.wenwu@gmail.com</a><br>
><br>
><br>
</div></div>> _____________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Kitware offers ITK Training Courses, for more information visit:<br>
> <a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
><br>
> Please keep messages on-topic and check the ITK FAQ at:<br>
> <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
><br>
_____________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Unpaid intern in BillsBasement at noware dot com<br><br>