mirror of
https://github.com/fralx/LimeReport.git
synced 2024-12-24 08:34:38 +03:00
Update readme for cmake
This commit is contained in:
parent
fe81e314d3
commit
288afc44e4
33
README.md
33
README.md
@ -23,8 +23,37 @@
|
|||||||
|
|
||||||
### How to use it
|
### How to use it
|
||||||
|
|
||||||
1. Build limereport.pro. It will create a limereport shared library
|
#### QMake
|
||||||
2. In your project connect the limereport library then in source code add:
|
|
||||||
|
- Build limereport.pro. It will create a limereport shared library
|
||||||
|
- In your project connect the limereport library
|
||||||
|
|
||||||
|
#### CMake
|
||||||
|
|
||||||
|
To use in your application without installation
|
||||||
|
|
||||||
|
There are 2 possible ways:
|
||||||
|
|
||||||
|
- Use cmake subdirectory in your CMakeLists.txt:
|
||||||
|
|
||||||
|
```cmake
|
||||||
|
add_subdirectory(LimeReport)
|
||||||
|
target_link_libraries(myapp PRIVATE limereport-qt${QT_VERSION_MAJOR})
|
||||||
|
```
|
||||||
|
- Use cmake FetchContent in your CMakeLists.txt:
|
||||||
|
|
||||||
|
```cmake
|
||||||
|
include(FetchContent)
|
||||||
|
FetchContent_Declare(
|
||||||
|
LimeReport
|
||||||
|
GIT_REPOSITORY https://github.com/fralx/LimeReport.git
|
||||||
|
GIT_TAG sha-of-the-commit
|
||||||
|
)
|
||||||
|
FetchContent_MakeAvailable(LimeReport)
|
||||||
|
target_link_libraries(myapp PRIVATE limereport-qt${QT_VERSION_MAJOR})
|
||||||
|
```
|
||||||
|
|
||||||
|
- Then in source code add:
|
||||||
|
|
||||||
```cpp
|
```cpp
|
||||||
#include "lrreportengine.h" to add report engine
|
#include "lrreportengine.h" to add report engine
|
||||||
|
Loading…
Reference in New Issue
Block a user