[Insight-users] Problem using SimpleITK
Bradley Lowekamp
blowekamp at mail.nih.gov
Sat Mar 9 22:59:48 EST 2013
On Mar 9, 2013, at 9:49 PM, Shireen Elhabian <shireen.youssef at gmail.com> wrote:
>
> Thanks for your reply ... would you mind telling me how to set simpleitk dir variable in my cmake file... I am using qtcreator with plain cmake list ... I already set up cmake module path variable with this directory that you mentioned but with no success .
When you run ccmake for your project SimpleITK_DIR should be a variable available for editing. Before you venture into a complicated project with qtcreator, you should try to get a basic project with just cmake. The Examples subdirectory in SimpleITK should be an example to get you started.
>
> .I am now rebuilding simple itk with the default setting where there is no shared libraries
>
> Another question ... the cmake install prefix path is set by default to my build directory ... should I change this to something related to usr/local directory ... also I have already built and installed the latest version of itk .. does this affect or change anything in simpleitk building ...
The SimpleITK default superbuild would install ITK too, so this would conflict with what already installed. If you have a compatible version of ITK installed into your system (SimpleITK 0.6.1 uses ITK 4.3.1), you can set the "USE_SYSTEM_ITK" variable when you configure the SimpleITK superbuild project. This will make use of the installed ITK. Alternatively, you could just install SWIG into your system, and build a non-superbuild version of ITK, which would have a standard "install" target.
>
> Thanks and I hope you can help me figure out how to solve this .. I have been struggling with it all day long with no hope
>
There are a lot of options for this setup. Many should work. I think you are pretty close to getting it figured out.
Brad
> Thanks
> Shireen
> On Saturday, March 9, 2013, Bradley Lowekamp <blowekamp at mail.nih.gov> wrote:
> > Hello,
> >
> > The quick answer is in your project's configuration set the CMake variable "SimpleITK_DIR" to "/PathToYouSimpleITKSuperbuid/lib/cmake/SimpleITK-0.6". This path should contain the SimpleITKConfig.cmake file and a couple other SimpleITK files. Alternatively, You should also be able to point this variable to the actual SimpleITK sub-build which would be "/PathToYouSimpleITKSuperbuid/SimpleITK-build".
> >
> > Regarding the installation. The way Superbuilds install is a little different than expected. In short it happens during the Superbuild process. If you configure the "CMAKE_INSTALL_PREFIX" to the path you want ITK and SimpleITK installed, they will be installed during the superbuild.
> >
> > The install only installs the C++ headers and libraries and not any of the Wrapped languages. Most of the wrapped languages have their own way to do things and configure modules, so that is not done by default.
> >
> > Lastly, because you said you needed to set the LD_LIBRARY_PATH it sounds like you choose to use shared libraries? This adds a bit of complexity to things, so unless there is a good reason I would not recommend to it get started with.
> >
> > Brad
> >
> >
> >
> > On Mar 9, 2013, at 5:01 PM, Shireen Elhabian <shireen.youssef at gmail.com> wrote:
> >
> >> Hi,
> >>
> >> I have built SimpleITK using SuperBuild as recommended. There is not
> >> make install rule for SimpleITK and I also updated LD_LIBRARY_PATH.
> >>
> >> Now I am trying to use it in my c++ projects (using cmake), but I am
> >> getting the following error, please tell me what I am missing here please
> >>
> >> CMake Error at CMakeLists.txt:13 (FIND_PACKAGE):
> >> By not providing "FindSimpleITK.cmake" in CMAKE_MODULE_PATH this project
> >> has asked CMake to find a package configuration file provided by
> >> "SimpleITK", but CMake did not find one.
> >>
> >> Could not find a package configuration file provided by "SimpleITK" with
> >> any of the following names:
> >>
> >> SimpleITKConfig.cmake
> >> simpleitk-config.cmake
> >>
> >> Add the installation prefix of "SimpleITK" to CMAKE_PREFIX_PATH or set
> >> "SimpleITK_DIR" to a directory containing one of the above files. If
> >> "SimpleITK" provides a separate development package or SDK, be sure it has
> >> been installed.
> >> _____________________________________
> >> 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
> >
> >
>
> --
> Shireen Y. Elhabian, PhD
> Information Technology Dept.,
> Faculty of Computers and Information,
> Cairo University
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20130309/6a02693f/attachment.htm>
More information about the Insight-users
mailing list