Skip to content

Commit

Permalink
Cleanup CMake builds
Browse files Browse the repository at this point in the history
  • Loading branch information
fpoussin committed Oct 28, 2024
1 parent d2224e7 commit e896861
Show file tree
Hide file tree
Showing 8 changed files with 55 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .cmake.conf
Original file line number Diff line number Diff line change
@@ -1 +1 @@
set(QT_REPO_MODULE_VERSION "6.0.3")
set(QT_REPO_MODULE_VERSION "6.4.2")
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@

cmake_minimum_required(VERSION 3.16)

# Allow to build with a different Qt version
set(QT_NO_PACKAGE_VERSION_CHECK TRUE)

include(.cmake.conf)
project(QtUsb
VERSION 6.8.0 # FIXME: this needs to match host's Qt version
VERSION 6.0.0 # We need 6.x
DESCRIPTION "A cross-platform USB Module for Qt."
HOMEPAGE_URL "https://github.com/fpoussin/QtUsb"
LANGUAGES CXX C
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ Check the [releases](https://github.com/fpoussin/QtUsb/releases) page or [appvey
## Build

**Unix**
You need libusb-1.0-0-dev, libhidapi-dev and pkg-config packages installed
You need `libusb-1.0-0-dev`, `libhidapi-dev` and `pkg-config` packages installed
If using system packages on Ubuntu, you'll need `qt6-base-private-dev` as well.
```shell
mkdir build && cd build
cmake ..
Expand Down
11 changes: 11 additions & 0 deletions src/usb/qhiddevice_p.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
#ifndef QHIDDEVICE_P_H
#define QHIDDEVICE_P_H

//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//

#include "qhiddevice.h"
#include <private/qobject_p.h>
#include <hidapi.h>
Expand Down
11 changes: 11 additions & 0 deletions src/usb/qusb_p.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
#ifndef Q_USB_P_H
#define Q_USB_P_H

//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//

#include "qusb.h"
#include <private/qobject_p.h>
#include <QTimer>
Expand Down
11 changes: 11 additions & 0 deletions src/usb/qusbdevice_p.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
#ifndef QUSBDEVICE_P_H
#define QUSBDEVICE_P_H

//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//

#include "qusbdevice.h"
#include <private/qobject_p.h>
#include <QThread>
Expand Down
4 changes: 4 additions & 0 deletions src/usb/qusbendpoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#include <QIODevice>
#include <QObject>

QT_BEGIN_NAMESPACE

class QUsbEndpointPrivate;

class Q_USB_EXPORT QUsbEndpoint : public QIODevice
Expand Down Expand Up @@ -112,4 +114,6 @@ public Q_SLOTS:
const quint8 m_ep;
};

QT_END_NAMESPACE

#endif // QUSBENDPOINT_H
11 changes: 11 additions & 0 deletions src/usb/qusbendpoint_p.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
#ifndef QUSBENDPOINT_P_H
#define QUSBENDPOINT_P_H

//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//

#include "qusbendpoint.h"
#include <QMutexLocker>
#include <private/qiodevice_p.h>
Expand Down

0 comments on commit e896861

Please sign in to comment.