How to install and use mmxlight

1.Dependencies

Here is the list of packages to be installed before configuring mmxlight:

src rpm deb port (Mac)
basix basix
readline-6.0 readline-devel libreadline-dev readline
ncurses-5.7 ncurses-devel libncurses-dev ncurses

2.Download

You can either

3.Configuration

To run the configuration, cmake (version ⩾ 2.6) should first be installed.

Local installation. The package can be configured out-of-source (eg. in a folder build) as follows:

mkdir build;
cd build;
cmake <mmxlight_source_dir>
make

where <mmxlight_source_dir> is the name of the folder of the package source (eg. ../mmxlight-0.1-Source or ../mmxlight),

Global installation. If you want to install it globally in your environment after it is compiled, you can run the following instructions (possibly with the superuser rights):

mkdir build;
cd build;
cmake <mmxlight_source_dir> -DCMAKE_INSTALL_PREFIX=<install_dir>
make && make install

where <install_dir> is the folder where to install the package so that the libraries go in <install_dir>/lib; and the headers in <install_dir>/include. If not specified, the package is installed by default in /usr/local. For more details, on the different options see here.

To see the operations performed during the make command, you can use:

make VERBOSE=1

To see the other available targets, you can use:

make help

4.How to set locally your environment variables

In case you have not run make install, you can set up your environment locally in the folder build with:

source local_env

5.Using mmxlight

To use the package mmxlight in a cmake project, you can simply add the following lines in your file CMakeLists.txt:

find_package(Mmxlight)
include_directories (${MMXLIGHT_INCLUDE_DIR})
link_libraries (${MMXLIGHT_LIBRARIES})
link_library_dir (${MMXLIGHT_LIBRARY_DIR})