14
14
15
15
## Intro
16
16
17
- For various reasons you may need to build HIDAPI on your own.
17
+ For various reasons, you may need to build HIDAPI on your own.
18
18
19
19
It can be done in several different ways:
20
20
- using [ CMake] ( BUILD.cmake.md ) ;
21
21
- using [ Autotools] ( BUILD.autotools.md ) (deprecated);
22
22
- using [ manual makefiles] ( #building-the-manual-way-on-unix-platforms ) ;
23
23
- using ` Meson ` (requires CMake);
24
24
25
- ** Autotools** build system is historically first mature build system for
26
- HIDAPI. Most common usage of it is in its separate README: [ BUILD.autotools.md] ( BUILD.autotools.md ) .<br />
25
+ ** Autotools** build system is historically the first mature build system for
26
+ HIDAPI. The most common usage of it is in its separate README: [ BUILD.autotools.md] ( BUILD.autotools.md ) .<br />
27
27
NOTE: for all intentions and purposes the Autotools build scripts for HIDAPI are _ deprecated_ and going to be obsolete in the future.
28
28
HIDAPI Team recommends using CMake build for HIDAPI.
29
29
30
30
** CMake** build system is de facto an industry standard for many open-source and proprietary projects and solutions.
31
- HIDAPI is one of the projects which uses the power of CMake for its advantage.
31
+ HIDAPI is one of the projects which use the power of CMake to its advantage.
32
32
More documentation is available in its separate README: [ BUILD.cmake.md] ( BUILD.cmake.md ) .
33
33
34
34
** Meson** build system for HIDAPI is designed as a [ wrapper] ( https://mesonbuild.com/CMake-module.html ) over CMake build script.
@@ -40,12 +40,12 @@ If you don't know where to start to build HIDAPI, we recommend starting with [CM
40
40
41
41
## Prerequisites:
42
42
43
- Regardless of what build system system you choose to use, there are specific dependencies for each platform/backend.
43
+ Regardless of what build system you choose to use, there are specific dependencies for each platform/backend.
44
44
45
45
### Linux:
46
46
47
47
Depending on which backend you're going to build, you'll need to install
48
- additional development packages. For ` linux/hidraw ` backend you need
48
+ additional development packages. For ` linux/hidraw ` backend, you need a
49
49
development package for ` libudev ` . For ` libusb ` backend, naturally, you need
50
50
` libusb ` development package.
51
51
@@ -59,19 +59,19 @@ sudo apt install libusb-1.0-0-dev
59
59
60
60
### FreeBSD:
61
61
62
- On FreeBSD you will need to install libiconv. This is done by running
62
+ On FreeBSD, you will need to install libiconv. This is done by running
63
63
the following:
64
64
``` sh
65
65
pkg_add -r libiconv
66
66
```
67
67
68
68
### Mac:
69
69
70
- On Mac make sure you have XCode installed and its Command Line Tools.
70
+ Make sure you have XCode installed and its Command Line Tools.
71
71
72
72
### Windows:
73
73
74
- On Windows you just need a compiler. You may use Visual Studio or Cygwin/MinGW,
74
+ You just need a compiler. You may use Visual Studio or Cygwin/MinGW,
75
75
depending on which environment is best for your needs.
76
76
77
77
## Embedding HIDAPI directly into your source tree
@@ -95,7 +95,7 @@ depending on your platform and the backend you want to use:
95
95
- make the platform/backend specific [ dependencies] ( #prerequisites ) available during the compilation/linking, when building ` hid.c ` ;
96
96
97
97
NOTE: the above doesn't guarantee that having a copy of ` <backend>/hid.c ` and ` hidapi/hidapi.h ` is enough to build HIDAPI.
98
- The only guarantee that ` <backend>/hid.c ` includes all nesessary sources to compile it as a single file.
98
+ The only guarantee that ` <backend>/hid.c ` includes all necessary sources to compile it as a single file.
99
99
100
100
Check the manual makefiles for a simple example/reference of what are the dependencies of each specific backend.
101
101
@@ -106,7 +106,7 @@ to build a program which embeds HIDAPI directly inside of it. These should
106
106
really be used as examples only. If you want to build a system-wide shared
107
107
library, use one of the build systems mentioned above.
108
108
109
- To build HIDAPI using the manual Makefiles, change to the directory
109
+ To build HIDAPI using the manual Makefiles, change the directory
110
110
of your platform and run make. For example, on Linux run:
111
111
``` sh
112
112
cd linux/
@@ -118,7 +118,7 @@ make -f Makefile-manual
118
118
To build the HIDAPI DLL on Windows using Visual Studio, build the ` .sln ` file
119
119
in the ` windows/ ` directory.
120
120
121
- To build HIDAPI using MinGW or Cygwin using Autotools, use a general Autotools
121
+ To build HIDAPI using MinGW or Cygwin using Autotools, use general Autotools
122
122
[ instruction] ( BUILD.autotools.md ) .
123
123
124
124
Any windows builds (MSVC or MinGW/Cygwin) are also supported by [ CMake] ( BUILD.cmake.md ) .
0 commit comments