COIN-OR::LEMON - Graph Library

Version 4 (modified by Peter Kovacs, 10 years ago) (diff)

--

LEMON Project Template

The aim of the template repository is to make is easier to setup a new LEMON based project. It provides a cross platform CMake build environment.

This guide assumes you use Linux or some other UN*X based system, but everything works equally well on Windows, too.

Setup and Build the Template

This is fairly easy. First, clone the project template repository and step into the dir, as follows.

hg clone http://lemon.cs.elte.hu/hg/lemon-project-template myproject
cd myproject

As you probably want to use LEMON in your project, you will need it too. For this you have to options. You can either install it somewhere or use a local copy of LEMON dedicated to your project. This later option is especially useful if you also modify/develop LEMON along with your project, or want to use a specific version.

Use a preinstalled version.

See the LEMON Install Guide for instructions on how to install LEMON. If you installed it to a non-standard place, you must let CMAKE know where to find it in the LEMON_ROOT_DIR config variable.

Use LEMON as a subproject.

Just simply copying the LEMON source code into the 'lemon' subdir will do the job. Namely, you can either extract a release tarball

wget http://lemon.cs.elte.hu/pub/sources/lemon-1.1.tar.gz
tar xzf lemon-1.1.tar.gz
mv lemon-1.1 lemon

or - even better - you can check out the mercurial LEMON repository

hg clone http://lemon.cs.elte.hu/hg/lemon-main lemon

Then run CMAKE to create the makefiles and compile the code as usual.

mkdir build
cd build
cmake-gui ..
make

Setup Your Own Project

Edit CMakeLists.txt to change the name of the project and the source files. Simply follow the instructions in CMakeLists.txt.

Attachments (1)

Download all attachments as: .zip