[Insight-users] Problem using SimpleITK

Bradley Lowekamp blowekamp at mail.nih.gov
Sat Mar 9 20:40:38 EST 2013


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



More information about the Insight-users mailing list