Lomse library installation instructions


Lomse distribution does not include makefiles. All makefiles are generated with CMake build system. CMake can generate different kinds of native build files for your system (e.g. Unix Makefiles, Eclipse CDT 4.0 project files, Visual Studio project files).

You need CMake 2.8.11 or later on your platform. You can download it from http://www.cmake.org/cmake/resources/software.html. Just download and install it (very simple).

This document contains detailed instructions for building Lomse library and tests program from sources. If you find things that need to be fixed and would like to contribute, you are welcome. Please post a message on the Lomse list. Thank you.

Table Of Content


To build the lomse library, the following software should be installed in your system:

In Linux, normally these packages are already installed in your system, so normally you do not have to install them. For other operating systems you will have to check if your system has these packages installed, and install any missing one. Please refer to each package website for instructions.

Quick installation guide

This procedure should work for any operating system supported by CMake, using CMake command-line interface. Do the following steps:

  1. Download lomse source tree from repository at GitHub. Let's assume the root folder containing the source tree is at folder "/projects/lomse".
  2. (Recommended) Create a directory to hold your build files (e.g. "/projects/lomse-build")
  3. Change directory to the directory you created in the previous step.
  4. Run cmake to generate the makefiles. For example, in Linux:

    For using CodeBlocs:

        cmake -G "CodeBlocks - Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug ../lomse

    For using makefiles:

        cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug ../lomse

At this point you've generated a makefile or project files using cmake. Now, just run 'make' and 'make install' or use your favourite IDE to build and install the library.

For detailed instructions see:

"In-source" vs. "Out-of-source" builds

Recommended way of installing Lomse: Out-of-source

When you generates the makefiles, they have to go somewhere. An "in-source" build puts them in your source tree (i.e. /lomse/build). In the next example the makefiles are placed in the same directory as the source code. Therefore, it is an "in-place" build:

    cd lomse
    mkdir build
    cmake -G "Unix Makefiles" ./

An out-of-source build puts them in a completely separate directory, so that your source tree is unchanged. Out-of-source builds are recommended, as you can build multiple variants in separate directories, i.e.:

            /lomse              <---- the source tree
            /lomse-debug        <---- to create debug build
            /lomse-release      <---- to create release build

In the following example, an out-of-place build is performed:

    cd lomse
    mkdir lomse-debug
    cd lomse-debug
    cmake -G "Unix Makefiles" ../lomse

Note: Before performing an out-of-source build, ensure that all CMake generated in-source build information is removed from the source directory, e.g., CMakeFiles directory, CMakeCache.txt.

Last updated: 2016/02/03