File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ All dependencies are built with cmake.
62
62
** Option 1: Using the module (static or dynamic)**
63
63
You'll need to add the module to into CMakeLists.txt:
64
64
```
65
- find_package(Qt6 REQUIRED COMPONENTS QtUsb )
65
+ find_package(Qt6 REQUIRED COMPONENTS Core Usb )
66
66
```
67
67
Include headers:
68
68
```
@@ -74,12 +74,18 @@ Include headers:
74
74
This will tie your app to a specific Qt version as it uses private headers
75
75
You need to add the QtUsb subdirectoty into CMakeLists.txt:
76
76
```
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)
78
84
```
79
85
Include headers:
80
86
```
81
- #include "qusbdevice.h"
82
- #include "qusbendpoint.h"
87
+ #include <QUsbDevice>
88
+ #include <QUsbEndpoint>
83
89
```
84
90
85
91
## Documentation
You can’t perform that action at this time.
0 commit comments