update docs

This commit is contained in:
Andrei Yankovich 2025-01-22 19:15:59 +01:00
parent f1e2d83680
commit 76d88f1323
2 changed files with 33 additions and 0 deletions

View File

@ -9,6 +9,33 @@ The module provides qt utils functions. This module contains some useful functio
---
**addQML** - function - This function add QML module into target and prepare qmldir file.
* This function add QML module into target and prepare qmldir file and qrc files.
* this function designed to prepare a static or shared library with qml components,
* that can be imported into other projects only after linked parent library.
#### Arguments :
- nicecery arguments:
- target - it is name of the target for that will be added QML module.
- QML_DIR - it is directory with QML files.
- optional arguments:
- VERSION - it is version of the QML module. Default value is 1.0.
- MODULE_NAME - it is name of the QML module. Default value is TARGET_NAME. For example if the target name is QEQuick3d then the module name will be QEQuick3dQML.
- PUBLIC - it is flag that indicate that the QML module will be public and afailable to using in all child libs. Default value is OFF.
- Example:
```cmake
addQML(QEQuick3d QML_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src)
addQML(QEQuick3d QML_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src VERSION 1.0 MODULE_NAME QEQuick3d)
# To get make qml module for your shared or static library:
addQML(${CURRENT_PROJECT} QML_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src/QEQuick3d" PUBLIC)
addQML(${CURRENT_PROJECT} QML_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src/QEQuick3d" VERSION 1.0 MODULE_NAME QEQuick3d PUBLIC)
```
**prepareQM** (name sourceDir ts_files) - This function prepare translations for you projects.
- name - This is a name of the translations target.
- sourceDir - This is root source directory. Update will be scan this dir for prepare translations.

View File

@ -39,9 +39,15 @@ endif()
# VERSION - it is version of the QML module. Default value is 1.0.
# MODULE_NAME - it is name of the QML module. Default value is TARGET_NAME.
# For example if the target name is QEQuick3d then the module name will be QEQuick3dQML.
# PUBLIC - it is flag that indicate that the QML module will be public and afailable to using in all child libs. Default value is OFF.
# Example:
# addQML(QEQuick3d QML_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src)
# addQML(QEQuick3d QML_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src VERSION 1.0 MODULE_NAME QEQuick3d)
#
# To get make qml module for your shared or static library:
# addQML(${CURRENT_PROJECT} QML_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src/QEQuick3d" PUBLIC)
# addQML(${CURRENT_PROJECT} QML_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src/QEQuick3d" VERSION 1.0 MODULE_NAME QEQuick3d PUBLIC)
function(addQML target)