Warning, /frameworks/kirigami/README.md is written in an unsupported language. File is not indexed.

0001 # Kirigami
0002 
0003 QtQuick plugins to build user interfaces following the [KDE Human Interface Guidelines](https://develop.kde.org/hig/).
0004 
0005 ## Introduction
0006 
0007 Kirigami is a set of [QtQuick](https://doc.qt.io/qt-6/qtquick-index.html) components for building adaptable user interfaces based on [QtQuick Controls 2](https://doc.qt.io/qt-6/qtquickcontrols-index.html). Kirigami makes it easy to create applications that look and feel great on [Plasma Mobile](https://plasma-mobile.org/), Desktop Linux, Android, MacOS, and Windows.
0008 
0009 The API can be found in the [KDE API Reference website](https://api.kde.org/frameworks/kirigami/html/index.html) and a Kirigami tutorial is available in the [KDE Developer Platform](https://develop.kde.org/docs/getting-started/kirigami/).
0010 
0011 We also provide [Kirigami Gallery](https://invent.kde.org/sdk/kirigami-gallery) to showcase most Kirigami components.
0012 
0013 ## Building Kirigami
0014 
0015 After installing `extra-cmake-modules` (ECM) and the necessary Qt6 development libraries, run:
0016 
0017 ```bash
0018 git clone https://invent.kde.org/frameworks/kirigami.git
0019 cd kirigami
0020 cmake -B build/ -DCMAKE_INSTALL_PREFIX=/path/where/kirigami/will/be/installed
0021 cmake --build build/
0022 cmake --install build/
0023 ```
0024 
0025 If you compiled and installed ECM yourself, you will need to add it to your PATH to compile Kirigami with it, as ECM does not provide its own `prefix.sh` file:
0026 
0027 ```bash
0028 PATH=/path/to/the/ecm/installation/usr/ cmake -B build/ -DCMAKE_INSTALL_PREFIX=/path/where/kirigami/will/be/installed
0029 cmake --build build/
0030 cmake --install build/
0031 ```
0032 
0033 Alternatively, we recommend you use [kdesrc-build](https://community.kde.org/Get_Involved/development#Setting_up_the_development_environment) to build extra-cmake-modules and Kirigami together.
0034 
0035 The provided Kirigami example can be built and run with:
0036 
0037 ```bash
0038 cmake -B build/ -DBUILD_EXAMPLES=ON
0039 cmake --build build/
0040 ./build/bin/applicationitemapp
0041 ```
0042 
0043 And the remaining examples containing only single QML files in the `examples/` folder can be viewed using `qml <filename.qml>` or `qmlscene <filename.qml>`.
0044 
0045 # Using a self-compiled Kirigami in your application
0046 
0047 To compile your application and link a self-compiled build of Kirigami to it, run:
0048 
0049 ```bash
0050 source path/to/kirigami/build/prefix.sh
0051 ```
0052 
0053 And then compile your application as usual.
0054 
0055 # Build your Android application and ship it with Kirigami
0056 
0057 1) Build Kirigami
0058 
0059 You will need to compile Qt for Android or use the [Qt Installer](https://www.qt.io/download-open-source) to install it, in addition to the Android SDK and NDK. After that, run:
0060 
0061 ```bash
0062 cmake -B build/ \
0063     -DCMAKE_TOOLCHAIN_FILE=/usr/share/ECM/toolchain/Android.cmake \
0064     -DCMAKE_PREFIX_PATH=/path/to/Qt5.15.9/5.15/android_armv7/ \
0065     -DCMAKE_INSTALL_PREFIX=/path/where/kirigami/will/be/installed/ \
0066     -DECM_DIR=/usr/share/ECM/cmake
0067 
0068 cmake --build build/
0069 cmake --install build/
0070 ```
0071 
0072 2) Build your application
0073 
0074 This guide assumes that you build your application with CMake and use [Extra CMake Modules (ECM)](https://api.kde.org/ecm/) from KDE frameworks.
0075 
0076 Replace `$yourapp` with the actual name of your application:
0077 
0078 ```bash
0079 cmake -B build/ \
0080     -DCMAKE_TOOLCHAIN_FILE=/usr/share/ECM/toolchain/Android.cmake \
0081     -DQTANDROID_EXPORTED_TARGET=$yourapp \
0082     -DANDROID_APK_DIR=../path/to/yourapp/ \
0083     -DCMAKE_PREFIX_PATH=/path/to/Qt5.15.9/5.15/android_armv7/ \
0084     -DCMAKE_INSTALL_PREFIX=/path/where/yourapp/will/be/installed/
0085 
0086 cmake --build build/
0087 cmake --install build/
0088 cmake --build build/ --target create-apk-$yourapp
0089 ```
0090 
0091 Note: `-DCMAKE_INSTALL_PREFIX` directory should be the same as where Kirigami was installed, since you need to create an apk package that contains both the Kirigami build and the build of your application.