Skip to content

Commit a6f3b55

Browse files
committed
update readme for internal build
1 parent d39995b commit a6f3b55

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ All dependencies are built with cmake.
6262
**Option 1: Using the module (static or dynamic)**
6363
You'll need to add the module to into CMakeLists.txt:
6464
```
65-
find_package(Qt6 REQUIRED COMPONENTS QtUsb)
65+
find_package(Qt6 REQUIRED COMPONENTS Core Usb)
6666
```
6767
Include headers:
6868
```
@@ -74,12 +74,18 @@ Include headers:
7474
This will tie your app to a specific Qt version as it uses private headers
7575
You need to add the QtUsb subdirectoty into CMakeLists.txt:
7676
```
77-
add_subdirectory(QtUsb)
77+
set(QTUSB_MODULE OFF CACHE BOOL "" FORCE)
78+
add_subdirectory(qtusb) # this assumes that QtUsb is cloned into ./qtusb
79+
add_library(Qt::Usb ALIAS ExtUsb)
80+
81+
add_executable(my_program main.cpp)
82+
# (omitting linking with Qt and other libraries)
83+
target_link_libraries(my_program PUBLIC Qt::Usb)
7884
```
7985
Include headers:
8086
```
81-
#include "qusbdevice.h"
82-
#include "qusbendpoint.h"
87+
#include <QUsbDevice>
88+
#include <QUsbEndpoint>
8389
```
8490

8591
## Documentation

0 commit comments

Comments
 (0)