Skip to content

Commit ce791c5

Browse files
committed
Update installation and README docs to add instructions for using prebuilt binaries with find_package
1 parent 5b9570d commit ce791c5

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,14 @@ target_link_libraries(MyApp PRIVATE QTradingView::QTradingView)
4949
```
5050
This automatically downloads, builds, and links QTradingView into your project.
5151

52+
Alternatively, if you installed the prebuilt binaries from the releases, you can use `find_package`:
53+
54+
```cmake
55+
find_package(QTradingView CONFIG REQUIRED)
56+
57+
add_executable(MyApp main.cpp)
58+
target_link_libraries(MyApp PRIVATE QTradingView::QTradingView)
59+
```
5260
## Usage
5361

5462
Creating charts is simple and modular. Start with a `Chart` add one or more `Panes` and attach series:

docs/installation.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,14 @@ target_link_libraries(MyApp PRIVATE QTradingView::QTradingView)
2929

3030
This downloads, builds, and links QTradingView into your project.
3131

32-
## Option B — add_subdirectory
32+
## Option B — Find package (prebuilt binaries)
3333

34-
If you prefer to keep the repository as a submodule or as part of your source tree, use `add_subdirectory`:
34+
If you installed the prebuilt binaries from the releases, you can use `find_package`:
35+
36+
Usage:
3537

3638
```cmake
37-
add_subdirectory(path/to/QTradingView)
39+
find_package(QTradingView CONFIG REQUIRED)
3840
add_executable(MyApp main.cpp)
3941
target_link_libraries(MyApp PRIVATE QTradingView::QTradingView)
4042
```

0 commit comments

Comments
 (0)