https://public.kitware.com/Wiki/api.php?action=feedcontributions&user=Arianne29&feedformat=atomKitwarePublic - User contributions [en]2024-03-28T14:55:14ZUser contributionsMediaWiki 1.38.6https://public.kitware.com/Wiki/index.php?title=ITK/Configuring_and_Building&diff=19079ITK/Configuring and Building2010-01-12T14:03:33Z<p>Arianne29: /* Wrapping ITK */</p>
<hr />
<div>== Configuring And Building ==<br />
<br />
This page describes the various ways of configuring and building ITK in common configurations. Recommended configurations are incldued for:<br />
<br />
* Linux<br />
* Mac OS X<br />
* Solaris<br />
* AIX<br />
* Windows<br />
<br />
It is strongly recommended that you build ITK in a separate tree. This is described elsewhere (?).<br />
<br />
=== CMake Configuration for Linux ===<br />
<br />
This configuration is the one used to build the packages for Debian GNU/Linux, but should work for any distribution just fine. It assumes that you already have certain libraries installed (which will almost always be the case), specifically:<br />
<br />
* libzlib<br />
* libjpg<br />
* libtiff<br />
* libpng<br />
<br />
The <tt>rpath</tt> option is disabled, as it is only really needed if you install the libraries into someplace other than a standard directory that is on your <tt>LD_LIBRARY_PATH</tt>.<br />
<br />
You can either paste this into a <tt>CMakeCache.txt</tt> or change the settings manually by running <tt>ccmake</tt>.<br />
<br />
# This is the Kickstart CMakeCache file for the Debian build of ITK.<br />
# Only those settings that are changed from the default are specified.<br />
&nbsp;<br />
// For some reason it defaults to c++<br />
CMAKE_CXX_COMPILER:STRING=g++<br />
&nbsp;<br />
// Don't build examples now (let the user later)<br />
BUILD_EXAMPLES:BOOL=OFF<br />
&nbsp;<br />
// Build ITK with shared libraries<br />
BUILD_SHARED_LIBS:BOOL=ON<br />
&nbsp;<br />
// Don't bother building the testing tree<br />
BUILD_TESTING:BOOL=OFF<br />
&nbsp;<br />
// Give us an optimised release build<br />
CMAKE_BUILD_TYPE:STRING=RELWITHDEBINFO<br />
&nbsp;<br />
// Install path prefix, prepended onto install directories<br />
CMAKE_INSTALL_PREFIX:PATH=/usr<br />
&nbsp;<br />
// The code still uses the older #include <iostream.h> style<br />
CMAKE_CXX_FLAGS:STRING=-Wno-deprecated <br />
&nbsp;<br />
// We do not want rpath enabled<br />
CMAKE_SKIP_RPATH:BOOL=ON<br />
&nbsp;<br />
// We haven't packaged this (yet)<br />
ITK_DATA_ROOT:PATH=ITK_DATA_ROOT_NOTFOUND<br />
&nbsp;<br />
// Use the system libraries for these<br />
ITK_USE_SYSTEM_JPEG:BOOL=ON<br />
ITK_USE_SYSTEM_PNG:BOOL=ON<br />
ITK_USE_SYSTEM_TIFF:BOOL=ON<br />
ITK_USE_SYSTEM_ZLIB:BOOL=ON<br />
&nbsp;<br />
//Build cswig Python wrapper support<br />
ITK_CSWIG_PYTHON:BOOL=ON<br />
&nbsp;<br />
//Build cswig Tcl wrapper support<br />
ITK_CSWIG_TCL:BOOL=ON<br />
<br />
==== Ebuild for Gentoo Linux ====<br />
<br />
For Gentoo Linux you can use the ebuild found in the following [http://github.com/thewtex/portage/tree/thewtex/sci-libs/itk/ gentoo/funtoo git repository].<br />
<br />
==== Build for Ubuntu Linux ====<br />
<br />
Please see the detailed [[ITK Configuring and Building for Ubuntu Linux]] notes.<br />
<br />
=== CMake Configuration for Mac OS X ===<br />
<br />
This configuration has been tested on Mac OS X Panther 10.3, with XCode 1.1 and 1.2. It presumes that [http://fink.sourceforge.net/ Fink] has been installed, with the following libraries in the default location under <tt>/sw</tt>:<br />
<br />
* libjpeg<br />
* libtiff<br />
* libpng<br />
* libzilb<br />
<br />
//Name of build on the dashboard<br />
BUILDNAME:STRING=Darwin-g++<br />
&nbsp;<br />
//Build source documentation using doxygen<br />
BUILD_DOXYGEN:BOOL=OFF<br />
&nbsp;<br />
//Build the Examples directory.<br />
BUILD_EXAMPLES:BOOL=OFF<br />
&nbsp;<br />
//Build ITK with shared libraries.<br />
BUILD_SHARED_LIBS:BOOL=ON<br />
&nbsp;<br />
//Build the testing tree.<br />
BUILD_TESTING:BOOL=OFF<br />
&nbsp;<br />
//Choose the type of build, options are: None(CMAKE_CXX_FLAGS or<br />
// CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.<br />
//<br />
CMAKE_BUILD_TYPE:STRING=RelWithDebInfo<br />
&nbsp;<br />
//C++ compiler<br />
CMAKE_CXX_COMPILER:STRING=g++<br />
&nbsp;<br />
//Use the system's jpeg library.<br />
ITK_USE_SYSTEM_JPEG:BOOL=ON<br />
&nbsp;<br />
//Use the system's png library.<br />
ITK_USE_SYSTEM_PNG:BOOL=ON<br />
&nbsp;<br />
//Use the system's tiff library.<br />
ITK_USE_SYSTEM_TIFF:BOOL=ON<br />
&nbsp;<br />
//Use an outside build of VXL.<br />
ITK_USE_SYSTEM_VXL:BOOL=OFF<br />
&nbsp;<br />
//Use the system's zlib library.<br />
ITK_USE_SYSTEM_ZLIB:BOOL=ON<br />
&nbsp;<br />
//What is the path where the file jpeglib.h can be found<br />
JPEG_INCLUDE_DIR:PATH=/sw/include<br />
&nbsp;<br />
//Where can the jpeg library be found<br />
JPEG_LIBRARY:FILEPATH=/sw/lib/libjpeg.dylib<br />
&nbsp;<br />
//Where can the png library be found<br />
PNG_LIBRARY:FILEPATH=/sw/lib/libpng.dylib<br />
&nbsp;<br />
//What is the path where the file png.h can be found<br />
PNG_PNG_INCLUDE_DIR:PATH=/sw/include<br />
&nbsp;<br />
//What is the path where the file tiff.h can be found<br />
TIFF_INCLUDE_DIR:PATH=/sw/include<br />
&nbsp;<br />
//Where can the tiff library be found<br />
TIFF_LIBRARY:FILEPATH=/sw/lib/libtiff.dylib<br />
&nbsp;<br />
//What is the path where the file zlib.h can be found<br />
ZLIB_INCLUDE_DIR:PATH=/usr/include<br />
&nbsp;<br />
//Where can the z library be found<br />
ZLIB_LIBRARY:FILEPATH=/usr/lib/libz.dylib<br />
<br />
=== CMake Configuration for Solaris ===<br />
<br />
=== CMake Configuration for AIX ===<br />
<br />
=== CMake Configuration for Windows ===<br />
<br />
== Using a predefined Configuration ==<br />
<br />
CMake can be run interactively to configure a build, in which case all settings begin with system defaults (as determined by <tt>CMakeLists.txt</tt>) and the user customises them.<br />
<br />
Alternatively, a predefined configuration (such as those shown above) can be provided, which will provide initial settings for the build (also known as ''priming''). By creating a file called <tt>CMakeCache.txt</tt> in the top level of the build directory, the settings defined therein will be used to override the default settings for the build.<br />
<br />
== Wrapping ITK ==<br />
<br />
ITK can be wrapped for several different languages such as Python, Tcl and Java. <br />
<br />
* [[ITK Java Wrapping|Java wrapping]] guide<br />
* [[ITK Python Wrapping|Python wrapping]] guide<br />
<br />
{{ITK/Template/Footer}}<br />
<br />
*Check this out..Best site for quality [http://www.research-service.com/ paper writing] essays, term paper, research paper, course work, book report and resume writing. All writing services are guaranteed written by professional writers.</div>Arianne29