Skip to content

Commit dbec7d3

Browse files
authored
Readme: add build instructions
This will also provide information about the supported Qt versions.
1 parent 6b3cc35 commit dbec7d3

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,32 @@ The QHotkey is a class that can be used to create hotkeys/global shortcuts, aka
1414

1515
**Note:** For now Wayland is not supported, as it is simply not possible to register a global shortcut with wayland. For more details, or possible Ideas on how to get Hotkeys working on wayland, see [Issue #14](https://github.com/Skycoder42/QHotkey/issues/14).
1616

17+
## Building
18+
19+
QHotkey supports both Qt6 and Qt5. When using Qt6, version 6.2.0 or later required. It can be built by either the CMake or qmake building systems.
20+
21+
### CMake
22+
23+
The CMake `QT_MAJOR` variable controls which major version of Qt is used for building, and defaults to `5`. For example, use the CMake command line option `-DQT_MAJOR=6` for building with Qt6. To build the testing application `QHotkeyTest`, specify `-DQHOTKEY_EXAMPLES=ON`. CMake example usage:
24+
25+
```
26+
$ cd QHotkey
27+
$ cmake -B build -S . -DQT_MAJOR=6
28+
$ cmake --build build
29+
# cmake --install build
30+
```
31+
32+
### qmake
33+
34+
The major version of Qt is chosen by the qmake invokation itself, as the qmake executable is tied to a specific Qt version. The executable name can vary between operating systems. qmake example usage:
35+
36+
```
37+
$ cd QHotkey
38+
$ qmake
39+
$ make
40+
# make install
41+
```
42+
1743
## Installation
1844
The package is providet as qpm package, [`de.skycoder42.qhotkey`](https://www.qpm.io/packages/de.skycoder42.qhotkey/index.html). You can install it either via qpmx (preferred) or directly via qpm.
1945

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy