Project

General

Profile

Actions

Building exiv2 on Ubuntu using Cmake

  • This has been tested on Ubuntu14.04 64 and 32 bit minimal installations.
  • Last revision on which this method was tested: r3288
  • This wiki page assumes that installation prefix is /usr/local and your build-dir is ~/gnu/exiv2
  1. Install some of the basic utilities
    sudo apt-get update
    sudo apt-get install -y subversion make cmake autoconf pkg-config g++ exifprobe libcurl4-openssl-dev libssh-dev clang #clang is required only if you wish to use it as the compiler instead of gcc
    
  2. Install all the dependencies for building exiv2. Since exiv2 is already available in the Ubuntu repositories, this method makes life easier.
    sudo apt-get build-dep -y exiv2
    

    In case you get the error ...
    E: You must put some 'source' URIs in your sources.list",
    

    .. then after following the steps in this link , do:
    sudo apt-get update
    
  3. Fetch the source code:
    mkdir -p ~/gnu/exiv2
    cd ~/gnu/exiv2
    svn checkout svn://dev.exiv2.org/svn/trunk
    cd trunk
    
  4. Build exiv2
    mkdir build
    cd build
    cmake ..                                        # if you are using clang, then do: CC=clang CXX=clang++ cmake ..
    make                                            # -DCMAKE_BUILD_TYPE=Debug for debugging
    sudo make install
    
  5. Building tests.
    • To execute tests:
      cd ~/gnu/exiv2/trunk/build
      make tests
      
    • Running other test suites

Updated by Nehal J Wani almost 7 years ago ยท 16 revisions