YANE-Framework 1.1.0

Installation of CMake based Projects


In order to compile cmake based projects you require


Unpacking any of the files via

        tar -xvf <libname>-<version>.tar.gz
        cd <libname>

will create a new folder containing the source code files.

Configuring the Projects

Within this folder, a new subfolder for compiling the source code should be generated

        cd <libname>-<version>
        mkdir <build> (or md <build> using Windows)

to avoid overwriting the CMake compilation and installation routines.

Now, the configuration file for CMake needs to be generated from within the created subfolder <build>. Here, user specific options can be supplied, e.g., a local installation path:

        cd build
        cmake -DCMAKE_INSTALL_PREFIX=<installation_path> ../

Note that the standard installationprefix is set to /usr/local and uses the subfolders /lib and /include/<libname>.

Compiling and Installing

Once the configuration is complete, the package can be compiled and installed via

        make install

Note that depending on the chosen <installation_path> the install command may require superuser rights. Using Windows, the CMake-Gui tool may also help you to ease the installation of the package.

Moreover, the environment variables used by the C++ compiler of the system must contain the installation path which can be added via

        export CPLUS_INCLUDE_PATH=<installation_path>/include:$CPLUS_INCLUDE_PATH
        export LIBRARY_PATH=<installation_path>/lib:$LIBRARY_PATH
        export LD_LIBRARY_PATH=<installation_path>/lib:$LD_LIBRARY_PATH

To set these variables globally please follow the documentation of your Linux distribution.