# Installation

xsimd is a header-only library, so installing it is just a matter of copying the `include/xsimd` directory.

However we provide standardized means to install it, with package managers or with cmake. Besides the xsimd 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 xsimd headers.

## Using the conda-forge Package

A package for xsimd is available for the mamba (or conda) package manager.

    mamba install -c conda-forge xsimd

## Using the Spack Package

A package for xsimd is available on the Spack package manager.

    spack install xsimd
    spack load xsimd

## From Source with cmake

You can install xsimd from source with cmake. 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