blob: 932db55f1b7b6601ddc7b1ba1cf13e24c3388468 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
# uvcgadget - UVC gadget C library
uvcgadget is a pure C library that implements handling of UVC gadget functions.
## Utilities
- uvc-gadget - Sample test application
## Build instructions:
To compile:
```
$ mkdir build
$ cd build
$ cmake ..
$ make -j4
```
## Cross compiling instructions:
Directions for cross compiling depend on the build environment.
For buildroot-based builds, cmake can be pointed to the toolchain file provided
by buildroot:
```
$ mkdir build
$ cd build
$ cmake -DCMAKE_TOOLCHAIN_FILE=<buildrootpath>/output/host/usr/share/buildroot/toolchainfile.cmake ..
$ make -j4
```
If your build environment doesn't provide a CMake toolchain file, the following
template can be used as a starting point.
```
set(CMAKE_SYSTEM_NAME Linux)
set(BUILD_ENV_ROOT "/path/to/your/build/enviroment/root/")
# Specify the cross compiler
set(CMAKE_C_COMPILER ${BUILD_ENV_ROOT}/host/usr/bin/arm-buildroot-linux-gnueabihf-gcc)
# Where is the target environment
set(CMAKE_FIND_ROOT_PATH ${BUILD_ENV_ROOT}/target ${BUILD_ENV_ROOT}/host)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
```
|