Build instructions

The build system is based on CMake (http://www.cmake.org/). In order to successfully configure and build the project, the following tools are more or less required:

First enter the Lensfun root folder and create a build directory.

cd lensfun
mkdir build

Enter the build directory and run CMake to configure your sources and create the build files

cd build
cmake ../

Run make/make install as usual

make install

After that, you may want to use ldconfig to add the necessary symlinks so that programs can find and use Lensfun.

The following CMake options can be set (defaults are upper case):

-DCMAKE_BUILD_TYPE=DEBUG|Release        select debug or release build mode
-DINSTALL_HELPER_SCRIPTS=off|ON         install various helper scripts
-DCMAKE_INSTALL_PREFIX=/USR/LOCAL       install prefix

-DBUILD_STATIC=OFF|on       build static or shared lib
-DBUILD_TESTS=OFF|on        build also the test programs
-DBUILD_LENSTOOL=OFF|on     build Lensfun reference implementation
-DBUILD_FOR_SSE=off|ON      build with SSE optimisation
-DBUILD_FOR_SSE2=off|ON     build with SSE2 optimisaiton
-DBUILD_DOC=OFF|on          build documentation

If you want to have more detailed output when running 'make' you can simply add 'VERBOSE=1' to the make command line.

You can also build packages with cmake:

command line and then "make package". (But this is not extensively tested.)

Please note that running cmake again does NOT reset all options to default or reconfigure all variables. To restart with a clean configuration delete all files in your cmake_build folder.

If you prefer setting the configuration with a GUI or want to get an extensive overview of all available settings and cache values you can run cmake-gui.