Skip to content

Commit

Permalink
updated the README, added nstructions about how to includeqnite in a …
Browse files Browse the repository at this point in the history
…CMake project
  • Loading branch information
gabomd committed Dec 29, 2023
1 parent 12e33de commit 10d20b3
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,46 @@ cmake --build .
ctest --output-on-failure
```

## Usage

How to include QNite in your CMake application:

* include qnite as a CMake subdirectory

* add qnite as your target dependency:

```
target_link_libraries(
my_target
PRIVATE
...
qnite
)
```

* in the project *main.cpp*, initialize qnite resources:

```
#include <qnite.h>
void main() {
...
Q_INIT_RESOURCE(qnite);
...
}
```

* add to your CMakeLists.txt the logic allowing to install qnite resources:

```
get_target_property(QNITE_SOURCE_DIR qnite SOURCE_DIR)
install(
DIRECTORY "${QNITE_SOURCE_DIR}/qml/Qnite/"
DESTINATION Qnite/
COMPONENT <my-component>
)
```

## Roadmap

Expand Down

0 comments on commit 10d20b3

Please sign in to comment.