# Xavia SDK 2.1.0

<pre style="font-size:8pt;text-align:center;line-height:1;">
__  __              _          ____   ____   _  __
\ \/ / __ _ __   __(_)  __ _  / ___| |  _ \ | |/ /
 \  / / _` |\ \ / /| | / _` | \___ \ | | | || ' / 
 /  \| (_| | \ V / | || (_| |  ___) || |_| || . \ 
/_/\_\\__,_|  \_/  |_| \__,_| |____/ |____/ |_|\_\
</pre>

- [Xavia SDK @PROJECT\_VERSION@](#xavia-sdk-project_version)
  - [📦 Features](#-features)
  - [🧰 Requirements](#-requirements)
  - [📥 Installation](#-installation)
  - [⚙️ Configuration \& Build](#️-configuration--build)
    - [User application (cmake integration)](#user-application-cmake-integration)
    - [Examples](#examples)

## 📦 Features

- Easy integration into C++ applications
- Multi-platform support (Windows/Linux)
- Example applications provided

---

## 🧰 Requirements

- **CMake** >= 3.21
- **C++ Standard:** C++17
- Supported OS:
  - Windows
  - Linux
- Supported platforms:
  - x86_64
  - arm

> note: the current download only supports one OS and platform combination.
> Please make sure you have the correct download for your target platform.

---

## 📥 Installation

Unpack `Xavia_SDK-2.1.0-Windows{.zip, .tar.gz}`  

The resulting folder will have this structure:

```text
/`Xavia_SDK-2.1.0-Windows`
    ├── bin                                         # Compiled shared library (runtime)
        └── Xavia_SDK.dll
    ├── cmake                                       # CMake package configuration files
        ├── Xavia_SDKConfig.cmake                   # Main configuration file
        ├── Xavia_SDKConfigVersion.cmake            # Optional version checker
        ├── Xavia_SDKTargets.cmake                  # Defines build targets
        └── Xavia_SDKAliases.cmake                  # Target aliases (e.g., xavia::sdk)
    ├── doc                                         # Documentation files
    ├── examples                                    # Examples of sdk usage
        ├── basic
        ├── eventHandling
        ├── pointCloudHandling
        ├── CMakeLists.txt
        └── examples.md
    ├── include                                     # SDK api headers
        └── xavia
            └── *.h
    ├── lib                                         # Build-time import libraries
        └── Xavia_SDK.lib
    └── Readme.md                                   # Main instruction markdown file
```

---

## ⚙️ Configuration & Build

### User application (cmake integration)

To integrate with a CMake-based project, use the standard CMake package discovery mechanism.
Add the following to your CMakeLists.txt:

```cmake
find_package(Xavia_SDK REQUIRED)
target_link_libraries(MyApp PRIVATE xavia::sdk)
```

With that, the structure of a user project typically looks like this:

```text
User Project
│
├── CMakeLists.txt
│     ↳ find_package(Xavia_SDK REQUIRED)
│     ↳ target_link_libraries(MyApp PRIVATE xavia::sdk)
│
└── Linked SDK Package (Installed)
      ├── include/            → SDK api headers
      ├── lib/                → Import libraries (.lib, .a)
      ├── bin/                → Runtime shared libraries (.dll, .so)
      └── cmake/              → Config + target files for CMake
```

### Examples

This sdk comes with a number of prepared examples.
These examples are for educational purposes or as a code starter to jump start your work.
The examples can be build without extra configuration:

```bash
cd Xavia_SDK-2.1.0-Windows
cmake -S ./examples -B ./examples/build -G {"Visual Studio 17 2022", "Ninja", etc.}
cmake --build ./examples/build --target example_basic
```

**Note:** The list of available examples and a detailed explanation of each can be found
in a [separate manual](./examples/examples.md)
