[ITK] [ITK-users] Configure ITK build for relocated use?

Matt McCormick matt.mccormick at kitware.com
Tue May 27 02:26:34 EDT 2014


Hi Marian,

It sounds like your development environment would be much improved by
using CMake for your projects instead of manually editting Visual
Studio project files (this is almost always the case).

Hope this helps,
Matt

On Tue, May 27, 2014 at 1:49 AM, Мар'ян Климов <nekto1989 at gmail.com> wrote:
> Hi Matt,
>
> Maybe you can give me some good advice :) I need at least 4 configurations
> for development for now (Debug|Win32, Debug|x64, RelWithDebInfo|Win32,
> RelWithDebInfo|x64). Currently I generate 2 solutions for build, add props
> to them to change path to output compiler pdb for static libraries and
> change toolset to v110_xp from v110. After that I build everything, backup
> bin/lib folders and make "clean" for solutions. Everything gets archived and
> in such way delivered to other developers. Libs/includes are added to
> solutions by using .props where all paths for include/libs are added. It's
> not very convenient when I need to rebuild smth that needs cmake. Pathes are
> hard-coded in cmake-files :( INSTALL makes install of one configuration only
> which isn't enough. And it needs changing of ITK_DIR for different
> configurations. Any thoughts on improvement?
>
> Marian
>
>
> 2014-05-27 7:25 GMT+03:00 Matt McCormick <matt.mccormick at kitware.com>:
>
>> Hi Barbara,
>>
>> To create an installation tree, build the "INSTALL" target in the
>> Visual Studio project.
>>
>> To change the installation prefix, set the CMAKE_INSTALL_PREFIX CMake
>> configuration variable.
>>
>> Place the install tree on the second machine.  In the second machine,
>> point your project's CMake configuration ITK_DIR to the location of
>> the directory with the ITKConfig.cmake file.  This will be
>> ${CMAKE_INSTALL_PREFIX}/lib/cmake/ITK-4.5/ITKConfig.cmake.
>>
>> Hope this helps,
>> Matt
>>
>> On Tue, May 20, 2014 at 9:42 AM, Barbara Post <bpo at eonix.be> wrote:
>> > Hi Jim, thanks, so how would I build an installation that would contain
>> > only
>> > necessary files and configure at installation time on second machine so
>> > that
>> > paths are ok ?
>> >
>> >
>> >
>> > I hope this is not too complicated, else I may go with manual build on
>> > both
>> > machines then… but projects like Qt have a single file with base path
>> > (Prefix in qt.conf).
>> >
>> >
>> >
>> > --
>> >
>> > Barbara POST
>> >
>> > +32 65/68.02.18
>> >
>> > bpo at eonix.be
>> >
>> >
>> >
>> > From: Jim Miller [mailto:millerjv at gmail.com]
>> > Sent: mardi 20 mai 2014 12:45
>> > To: Barbara Post
>> > Cc: insight-users at itk.org
>> > Subject: Re: [ITK-users] Configure ITK build for relocated use?
>> >
>> >
>> >
>> > I think we recommend against doing what you are attempting.  I think a
>> > lot
>> > of the paths for the build are coded into the solution files. I suspect
>> > you
>> > will have difficulties unless the paths to ITK are exactly the same on
>> > the
>> > two machines (for instance on a project share that is mounted the same
>> > on
>> > both machines).
>> >
>> >
>> >
>> > Common practice is to have a separate build per machine.
>> >
>> >
>> >
>> > If you do not need to build ITK on the second machine but only build
>> > your
>> > application, you may be able we to build an installation and the install
>> > that built version of ITK on the second machine.
>> >
>> > Jim
>> >
>> >
>> > On May 20, 2014, at 4:52 AM, Barbara Post <bpo at eonix.be> wrote:
>> >
>> > Hello,
>> >
>> >
>> >
>> > I need to use an ITK build on another similar machine.
>> >
>> >
>> >
>> > Here is what I did on first development machine:
>> >
>> > -          build ITK 3.20 using MSVC 2010 64bit compiler (I use CMake
>> > and VS
>> > 2010)
>> >
>> > -          I then get “c:\ITK320-build” folder
>> >
>> > -          Link my app against ITK, CMake finds ITK without glitches, I
>> > even
>> > didn’t set ITK_DIR.
>> >
>> >
>> >
>> > Now I want to zip ITK build folder and use in in another location, or in
>> > my
>> > test just rename c:\ITK320.
>> >
>> > What should I adjust, in addition to ITK_DIR? I tried to edit
>> > c:\ITK320-build\ItkConfig.Cmake with new path but still get the
>> > following
>> > error. So I was wrong.
>> >
>> >
>> >
>> > Thanks for pointers.
>> >
>> >
>> >
>> > I have an additional question: can I use folder with space in path? Just
>> > to
>> > be sure it’s a problem for CMake C++ project, as I find out for Qt (Qt
>> > unpacking directory cannot contain spaces).
>> >
>> >
>> >
>> > CMake Error at C:/Program Files (x86)/CMake
>> > 2.8/share/cmake-2.8/Modules/FindITK.cmake:48 (find_package):
>> >
>> >   Could not find a package configuration file named "ITKConfig.cmake"
>> >
>> >   provided by package "ITK".
>> >
>> >
>> >
>> >   Add the installation prefix of "ITK" to CMAKE_PREFIX_PATH or set
>> > "ITK_DIR"
>> >
>> >   to a directory containing one of the above files.  If "ITK" provides a
>> >
>> >   separate development package or SDK, be sure it has been installed.
>> >
>> > Call Stack (most recent call first):
>> >
>> >   CMakeLists.txt:13 (find_package)
>> >
>> > _____________________________________
>> > 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.php
>> >
>> > 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
>> >
>> >
>> > _____________________________________
>> > 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.php
>> >
>> > 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
>> >
>> > _______________________________________________
>> > Community mailing list
>> > Community at itk.org
>> > http://public.kitware.com/cgi-bin/mailman/listinfo/community
>> >
>> _____________________________________
>> 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.php
>>
>> 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
>> _______________________________________________
>> Community mailing list
>> Community at itk.org
>> http://public.kitware.com/cgi-bin/mailman/listinfo/community
>
>
_____________________________________
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.php

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


More information about the Community mailing list