[ VIGRA Homepage | Function Index | Class Index | Namespaces | File List | Main Page ]
Installation |
VIGRA can be downloaded from http://hci.iwr.uni-heidelberg.de/vigra/. It should work with any standard conforming C++ compiler on both 32-bit and 64-bit machines.
VIGRA is mainly a header library, i.e. much of its functionality can be accessed by simply copying the include files to a convenient location. A more involved build process is necessary for image file import and export, for the VIGRA Python bindings, and for the test suite and examples. VIGRA can take advantage of the following external software packages:
These dependencies are optional - the functionality will simply be unavailable if the libraries cannot be found.
VIGRA installation is based on cmake which has to be installed on your machine. In order to configure the build and installation process, execute the following on the command line:
When you use gcc 4.8.1, make sure to change the optimization level to -O2
in the cmake configuration (this is best done in the cmake GUI that you get by calling ccmake .
before invoking make
). The -O3
level in that compiler is buggy and leads to crashes.
If you use Microsoft Visual C++, you just execute cmake
(not make
) or cmake-gui
with the appropriate generator which creates a solution file '<vigra_build_path>/vigra.sln'. This file must be opened in Visual Studio, and the projects 'ALL_BUILD', 'check', 'doc', 'INSTALL', and 'examples' should be generated. Important note: If you include "windows.h" in your projects: there are some name clashes with VIGRA – always include "vigra/windows.h" instead.
cmake [options] customize installation directories and guide cmake in its search for the VIGRA dependencies. On a Linux system, it is often possible to configure without any options. The most commonly used options are:
More fine-grained customization (e.g. specification of explicit paths for all dependencies, customization of compiler flags) is possible by editing the file <vigra_build_path>/CMakeCache.txt. This is best done by means of the interactive programs ccmake or cmake-gui. Consult the cmake documentation for more detailed help.
For using VIGRA in another CMake-built project, you can use the CMake command FIND_PACKAGE(Vigra), which will set the CMake variables ${Vigra_INCLUDE_DIRS} with the correct include path, and import the binary targets (currently vigraimpex) to link against (e.g., TARGET_LINK_LIBRARIES(targetname vigraimpex)). For this mechanism to work, CMake reads a config file VigraConfig.cmake, which is installed along with the library in CMAKE_INSTALL_PREFIX/lib/vigra. Alternatively, you can point CMake (cache entry Vigra_DIR) to VIGRA's build directory, where a corresponding VigraConfig.cmake resides for using the build version directly without installation.
© Ullrich Köthe (ullrich.koethe@iwr.uni-heidelberg.de) |
html generated using doxygen and Python
|