How to install and use basix

1.Dependencies

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

src rpm deb port (Mac)
libtool-2.2.4 libtool-(ltdl-)devel libtool-dev libtool

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 <basix_source_dir>
make

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

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 <basix_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 basix

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

find_package(Basix)
include_directories (${BASIX_INCLUDE_DIR})
link_libraries (${BASIX_LIBRARIES})
link_library_dir (${BASIX_LIBRARY_DIR})