[Insight-developers] [Insight-users] which ITK libraries are searched and linked when Multiversion ITK installed ?
Matt McCormick
matt.mccormick at kitware.com
Thu Jan 5 18:38:30 EST 2012
Yes, but you do not want to set it as an environment variable, but in
the CMake configuration. That is, set it with the cmake-gui, ccmake,
cmake -DITK_DIR=/path/to/build, or editing the file CMakeCache.txt.
Matt
On Thu, Jan 5, 2012 at 6:07 PM, Wenwu <cool.wenwu at gmail.com> wrote:
> Hi Matt,
>
> Your idea is perfect! I have add a system environment para-ITK_DIR, then I
> will restart and reconfigure in CMake, I hope it can work! I don't have
> to rebuild the ITK?
>
>
> On Thu, Jan 5, 2012 at 11:38 PM, Matt McCormick <matt.mccormick at kitware.com>
> wrote:
>>
>> Hi Wenwu,
>>
>> To build against a specific version, set the CMake configuration
>> variable, "ITK_DIR", to the path of the install or build for that
>> version.
>>
>> Hope this helps,
>>
>> Matt
>>
>> On Thu, Jan 5, 2012 at 5:06 PM, Wenwu <cool.wenwu at gmail.com> wrote:
>> > Hi everyone,
>> >
>> > At the beginning, The ITK3.2 was installed in my computer(window7,
>> > visual
>> > studio 2008 c++ express), then I installed the lastest version ITK4.0,
>> > so
>> > now, how to write the CMakeLists? Maybe it is very easy! If you are
>> > free,
>> > please tell me!! Thank you very much!
>> >
>> >
>> > e.g,
>> >
>> > cmake_minimum_required( VERSION 2.8 )
>> > project( image_read_write )
>> >
>> > find_package (ITK) ### here, because of two ITK version in my computer,
>> > how
>> > to specify the specific one?
>> > if (ITK_FOUND)
>> > include ( ${ITK_USE_FILE} )
>> > else (ITK_FOUND)
>> > message (FATAL_ERROR "Cannot build without ITK, Please set ITK_DIR.")
>> > endif (ITK_FOUND)
>> >
>> > add_executable( image_read_write main.cxx )
>> >
>> > target_link_libraries( image_read_write ### And here?
>> > ${ITK_LIBRARIES}
>> > itkCommon
>> > itkIO
>> > )
>> >
>> >
>> >
>> >
>> > --
>> > Wenwu Zhu
>> > University of Strasbourg, France
>> > Email address: cool.wenwu at gmail.com
>> >
>> >
>> > _____________________________________
>> > Powered by www.kitware.com
>> >
>> > Visit other Kitware open-source projects at
>> > http://www.kitware.com/opensource/opensource.html
>> >
>> > Kitware offers ITK Training Courses, for more information visit:
>> > http://www.kitware.com/products/protraining.html
>> >
>> > Please keep messages on-topic and check the ITK FAQ at:
>> > http://www.itk.org/Wiki/ITK_FAQ
>> >
>> > Follow this link to subscribe/unsubscribe:
>> > http://www.itk.org/mailman/listinfo/insight-users
>> >
>
>
>
>
> --
> Wenwu Zhu
> IRCAD
>
> University of Strasbourg, France
> Email address: cool.wenwu at gmail.com
>
More information about the Insight-developers
mailing list