How to build

Alexander Sokolov edited this page Oct 26, 2013 · 2 revisions

Flacon uses CMake as its build tool, and requires following libraries:

  • Qt4 devel support (libqt4-dev package for Debian/Ubuntu)
  • libuchardet devel support (libuchardet-dev package for Debian/Ubuntu)

First, you need to get the source code, either zip archive or by cloning the git repository see github help.

Now, suppose you have downloaded the flacon-master.zip archive, here are roughly what you should do next (character $ below indicates the shell prompt with normal user privilege)

  • Place the archive at your working directory, e.g. ~/src/flacon:

    $ mkdir -p ~/src/flacon/
    $ cp /where/you/put/the/downloaded/flacon-master.zip ~/src/flacon/
    
  • Unpack the archive.

    $ cd ~/src/flacon/
    $ unzip flacon-master.zip
    
  • Make a new directory to perform an out-of-source build (recommended way to build software with CMake):

    $ cd ~/src/flacon/flacon-master
    $ mkdir build
    
  • Go to the build directory and run cmake:

    $ cd build
    $ cmake ..
    
  • There are somee useful variables to customize:

    • -DCMAKE_INSTALL_PREFIX=/usr - If "make install" is invoked or INSTALL is built, this directory is pre-pended onto all install directories. This variable defaults to /usr/local on UNIX.
    • -DBUILD_TESTS=Yes - Build unit tests program. You can find it in the build/tests directory.
  • If the configuration phase runs successfully, run make as usual.

  • For the installation, run make install. However, for better management with package manager, checkinstall is preferred over the traditional make install. Anyway, suit yourself.