Project

General

Profile

Actions

Building on MacOSX Using CMake

  • This has been tested on Mac OS X 10.9.4 Build: 13E28
  • Last revision on which this method was tested: r3348
  • This wiki page assumes that installation prefix is /usr/local and your build-dir is ~/gnu/exiv2
  1. Install gcc (optional, required only if you want to use gcc)
    sudo port install gcc49
    
  2. Fetch the source code:
    mkdir -p ~/gnu/exiv2
    cd ~/gnu/exiv2
    svn checkout svn://dev.exiv2.org/svn/trunk
    cd trunk
    
  3. Build exiv2
    mkdir build
    cd build
    CC=clang CXX=clang++ cmake ..                   # if you are using clang, then do: CC=gcc-mp-4.9 CXX=g++-mp-4.9 cmake ..
    make                                            # -DCMAKE_BUILD_TYPE=Debug for debugging
    sudo make install
    
  4. Building samples
    export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
    make samples
    
  5. Build tests.
    • To execute tests:
      cd ~/gnu/exiv2/trunk
      make tests
      
    • Running other test suites

Updated by Nehal J Wani about 7 years ago ยท 2 revisions