You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

Building on Linux

Ubuntu

You need the following packages:

  1. cmake --- we use the latest version (3.0.2) and if Ubuntu has not upgraded yet, you need to go here to get it: http://www.cmake.org/download/
  2. libxml2-dev
  3. zlib1g-dev
  4. libsdl2-image-dev

Typical command to get the libraries needed is sudo apt-get install libxml2

Fedora

You need the following packages:

  1. cmake --- we use the latest version (3.0.2) and if Fedora has not upgraded yet, you need to go here to get it: http://www.cmake.org/download/
  2. libxml2-dev
  3. zlib1g-dev
  4. libsdl2-image-dev

Typical command to get the libraries needed is sudo yum install libxml2

Making the make files

Note that, as per standard cmake practice, you should always build separately from the source tree (although a separate sub-directory within the source tree is acceptable).

Set the DOCFORMATS_DIR environment variable to the location of the repository root. Then, any where on your file system:

cd build

cmake -G "Unix Makefiles" $DOCFORMATS_DIR

Build

To have the make system call your compiler and build the binaries

make

This will produce four binaries in your build directory:

lib/libDocFormats.a  – a static library

bin/dfconvert   – the converter program

bin/dftest         – the test suite

bin/dfutil          –  the driver program

   

To run the tests, type the following from your /build directory:

./bin/dftest -plain

 

 Building on OS X

 

You can either use the instructions above for building using make, or alternatively generate an Xcode project:

 

    mkdir build

    cd build

    cmake -G Xcode $DOCFORMATS__DIR

 

 

This will produce DocFormats.xcodeproj, which you can then open in Xcode.

 

Building on Windows

 

 

  • No labels