# Importing and Including

## Step 1 - Add to project sources

{% hint style="info" %}
**MauiKit** supports ***qmake*** and ***cmake***
{% endhint %}

### Importing - Statically linking

To statically add **MauiKit** to your project using *qmake,*  you need to clone the **MauiKit** repository inside you project's root folder, and then the project's `[project-name].pro` should look like this :

{% code title="\[project-name].pro" %}

```
linux:unix:!android {
message(Building for Linux )
} else:android {
message(Building for Android)
 include($$PWD/3rdparty/kirigami/kirigami.pri)
} else {
 message(“Unknown configuration”)
}
include($$PWD/mauikit/mauikit.pri)

```

{% endcode %}

This will include **MauiKit** as a sub-module. It is recommended to only do this to deploy your project to other systems besides GNU Linux, like Android, Mac OS X, WIndows, etc...

{% hint style="info" %}
**MauiKit** works on top of Kirigami and so it depends on it. If you plan to deploy your app on a device running Android you will also need to add the Kirigami submodule.
{% endhint %}

MauiKit's *mauikit.pri* file creates a useful definition named ***STATIC\_MAUIKIT***, you can make use of this definition in your project source code to differentiate when deploying to different systems.

### Including - Framework

For GNU Linux the best way to make use of **MauiKit** is to install it system wide.

After building and installing **MauiKit** you can now include it in your project to start making use of it.

To include **MauiKit** with *cmake*:

```
find_package(MauiKit REQUIRED)
```

To use it with *qmake* you need to include the **MauiKit** shared library into your project .pro file:

```
LIBS += -lMauiKit
```

{% hint style="success" %}
You can skip to the third step if you installed **MauiKit** system wide.
{% endhint %}

## Step 2 - Include MauiKit Header File

{% hint style="warning" %}
This step is only necessary if you are statically linking **MauiKit** into your project.
{% endhint %}

Include the **MauiKit** header file as follows :

```cpp
#include “mauikit.h”
```

Then, register **MauiKit** Components :

```cpp
MauiKit::getInstance().registerTypes();
```

## Step 3 - Import MauiKit QML Controls

On your QML files you now can import the Maui Kit controls as follows :

```javascript
import org.kde.mauikit 1.0 as Maui
```

{% hint style="success" %}
You’re ready to start creating your next convergent application using MauiKit
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://maui-project.gitbook.io/mauikit/getting-started/importing-mauikit-in-a-project.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
