Installation¶
Although xframe
is a header-only library, we provide standardized means to
install it, with package managers or with cmake.
Besides the xframe headers, all these methods place the cmake
project
configuration file in the right location so that third-party projects can use
cmake’s find_package
to locate xframe headers.
Using the conda-forge package¶
A package for xframe is available for the mamba (or conda) package manager.
mamba install -c conda-forge xframe
From source with cmake¶
You can also install xframe
from source with cmake. This requires that you
have the xtensor library installed on your system. On Unix platforms,
from the source directory:
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=path_to_prefix ..
make install
On Windows platforms, from the source directory:
mkdir build
cd build
cmake -G "NMake Makefiles" -DCMAKE_INSTALL_PREFIX=path_to_prefix ..
nmake
nmake install
path_to_prefix
is the absolute path to the folder where cmake searches for
dependencies and installs libraries. xframe
installation from cmake assumes
this folder contains include
and lib
subfolders.
Including xframe in your project¶
The different packages of xframe
are built with cmake, so whatever the
installation mode you choose, you can add xframe
to your project using cmake:
find_package(xframe REQUIRED)
target_include_directories(your_target PUBLIC ${xframe_INCLUDE_DIRS})
target_link_libraries(your_target PUBLIC xframe)