@@ -32,14 +32,14 @@ Check the [releases](https://github.com/fpoussin/QtUsb/releases) page or [appvey
32
32
You need libusb-1.0-0-dev, libhidapi-dev and pkg-config packages installed
33
33
``` shell
34
34
mkdir build && cd build
35
- qmake ..
35
+ cmake ..
36
36
make install
37
37
```
38
38
39
39
Alternatively build as static module (best for portability)
40
40
``` shell
41
41
mkdir build && cd build
42
- qmake CONFIG+=qtusb-static ..
42
+ cmake -DQTUSB_AS_STATIC_MODULE=ON ..
43
43
make install
44
44
```
45
45
@@ -54,14 +54,14 @@ ie: build_msvc.bat 2017 x64 static C:\Qt\5.14.1\msvc2017_64
54
54
55
55
** Qt Creator**
56
56
The module can also be built normally within QT creator regardless of the platform.
57
- All dependencies are built with qmake .
57
+ All dependencies are built with cmake .
58
58
59
59
## Using
60
60
61
61
** Option 1: Using the module (static or dynamic)**
62
- You'll need to add the module to your project file:
62
+ You'll need to add the module to into CMakeLists.txt:
63
63
```
64
- qt += usb
64
+ find_package(Qt6 REQUIRED COMPONENTS QtUsb)
65
65
```
66
66
Include headers:
67
67
```
@@ -71,9 +71,9 @@ Include headers:
71
71
72
72
** Option 2: Importing the code in your project**
73
73
This will tie your app to a specific Qt version as it uses private headers
74
- You need to include the pri file into your qmake file :
74
+ You need to add the QtUsb subdirectoty into CMakeLists.txt :
75
75
```
76
- include (QtUsb/src/usb/files.pri )
76
+ add_subdirectory (QtUsb)
77
77
```
78
78
Include headers:
79
79
```
@@ -89,5 +89,5 @@ Online documentation can be found [here](https://fpoussin.github.io/doxygen/qtus
89
89
90
90
## Downloads
91
91
92
- [ Ubuntu PPA] ( https://launchpad.net/~fpoussin/+archive/ubuntu/ppa )
92
+ [ Ubuntu PPA] ( https://launchpad.net/~fpoussin/+archive/ubuntu/ppa )
93
93
Windows binaries are [ in the releases section] ( https://github.com/fpoussin/QtUsb/releases ) .
0 commit comments