summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorKieran Bingham <kieran.bingham@ideasonboard.com>2022-11-01 21:19:20 +0000
committerKieran Bingham <kieran.bingham@ideasonboard.com>2022-11-22 12:31:14 +0000
commit2619164b6998b2143e776a1c2f10140af9fe878b (patch)
tree4c9b370776e198d2288462c58713531a84750f09 /README.md
parent0e9c6b1e32f5ef38286ff2e0774ba69caf2eee7b (diff)
meson: Convert CMake to Meson build infrastructure
Provide infrastructure to be able to build the uvc-gadget library as a shared object and an executable which links against this as a dependency to implment the reference 'uvc-gadget' application. All existing cmake infrastructure is removed. This removes custom glob support that was previously used by an early development for Android, which is expected to be re-added later when required. Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'README.md')
-rw-r--r--README.md39
1 files changed, 8 insertions, 31 deletions
diff --git a/README.md b/README.md
index 932db55..f0728ff 100644
--- a/README.md
+++ b/README.md
@@ -11,41 +11,18 @@ uvcgadget is a pure C library that implements handling of UVC gadget functions.
To compile:
```
-$ mkdir build
-$ cd build
-$ cmake ..
-$ make -j4
+$ meson build
+$ ninja -C build
```
## 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.
+Cross compilation can be managed by meson. Please read the directions at
+https://mesonbuild.com/Cross-compilation.html for detailed guidance on using
+meson.
+In brief summary:
```
-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)
+$ meson build --cross <meson cross file>
+$ ninja -C build
```