summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md64
1 files changed, 29 insertions, 35 deletions
diff --git a/README.md b/README.md
index 4e011a3..9e465ed 100644
--- a/README.md
+++ b/README.md
@@ -30,56 +30,51 @@ git submodule update --init
And to compile:
```
-$ mkdir build
-$ cd build
-$ cmake ..
-$ make -j4
+meson build
+ninja -C build
```
## Cross compiling instructions:
-Directions for cross compiling depend on your environment.
-
-These are for mine with buildroot:
-
```
-$ mkdir build
-$ cd build
-$ cmake -DCMAKE_TOOLCHAIN_FILE=<buildrootpath>/output/host/usr/share/buildroot/toolchainfile.cmake ..
-$ make -j4
+meson build --cross-file=<path-to-meson-cross-file>
+ninja -C build
```
-Your environment may provide similar toolchainfile. If not, you can create a toolchainfile of your own, something along these lines:
+Here is my cross file for arm32 (where ${BROOT} is path to my buildroot output dir):
```
-SET(CMAKE_SYSTEM_NAME Linux)
-
-SET(BROOT "<buildroot>/output/")
+[binaries]
+c = ['ccache', '${BROOT}/host/bin/arm-buildroot-linux-gnueabihf-gcc']
+cpp = ['ccache', '${BROOT}/host/bin/arm-buildroot-linux-gnueabihf-g++']
+ar = '${BROOT}/host/bin/arm-buildroot-linux-gnueabihf-ar'
+strip = '${BROOT}/host/bin/arm-buildroot-linux-gnueabihf-strip'
+pkgconfig = '${BROOT}/host/bin/pkg-config'
+
+[host_machine]
+system = 'linux'
+cpu_family = 'arm'
+cpu = 'arm'
+endian = 'little'
+```
-# specify the cross compiler
-SET(CMAKE_C_COMPILER ${BROOT}/host/usr/bin/arm-buildroot-linux-gnueabihf-gcc)
-SET(CMAKE_CXX_COMPILER ${BROOT}/host/usr/bin/arm-buildroot-linux-gnueabihf-g++)
+## Build options
-# where is the target environment
-SET(CMAKE_FIND_ROOT_PATH ${BROOT}/target ${BROOT}/host)
+You can use meson options to configure the build. E.g.
-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 -Dbuildtype=debug -Dkmscube=true
```
-## Build options
+Use `meson configure build` to see all the configuration options and their current values.
-You can use the following cmake flags to control the build. Use `-DFLAG=VALUE` to set them.
+kms++ specific build options are:
-Option name | Values | Default | Notes
------------------------- | ------------- | --------------- | --------
-CMAKE_BUILD_TYPE | Release/Debug | Release |
-BUILD_SHARED_LIBS | ON/OFF | OFF |
-KMSXX_ENABLE_PYTHON | ON/OFF | ON |
-KMSXX_ENABLE_KMSCUBE | ON/OFF | OFF |
-KMSXX_ENABLE_LIBDRMOMAP | ON/OFF | OFF |
-KMSXX_PYTHON_VERSION | python3 | python3 | Name of the python pkgconfig file
+Option name | Values | Default | Notes
+---------------- | ------------- | --------------- | --------
+pykms | true, false | true | Python bindings
+kmscube | true, false | false | GLES kmscube
+omap | enabled, disabled, auto | auto | libdrm-omap support
## Env variables
@@ -98,5 +93,4 @@ You can run the python code directly from the build dir by defining PYTHONPATH e
```
PYTHONPATH=build/py py/tests/hpd.py
-
```