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

Matt McCormick matt.mccormick at kitware.com
Tue May 27 00:25:40 EDT 2014


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
>


More information about the Insight-users mailing list