8ca0ba94d24668a825311a7c43f2da42c3ef1e83
1 # libkms++ - C++ library for kernel mode setting
3 libkms++ is a C++11 library for kernel mode setting.
5 Also included are simple test tools for KMS and python wrapper for libkms++.
7 ## Test tools
9 - kmsprint - print information about DRM objects
10 - testpat - set modes and show test pattern on crtcs/planes
11 - kmsview - view raw images
12 - db - simple double-buffering test
13 - kmscube - rotating 3D cube on crtcs/planes
15 ## Dependencies:
17 - libdrm
18 - Python 3.x (for python bindings)
20 ## Build instructions:
22 ```
23 $ mkdir build
24 $ cd build
25 $ cmake ..
26 $ make -j4
27 ```
29 ## Cross compiling instructions:
31 Directions for cross compiling depend on your environment. These are for mine (buildroot):
33 As above, but specify `-DCMAKE_TOOLCHAIN_FILE=<path>/your-toolchain.cmake` for cmake, where your-toolchain.cmake is something similar to:
35 ```
36 SET(CMAKE_SYSTEM_NAME Linux)
38 SET(BROOT "<buildroot>/output/")
40 # specify the cross compiler
41 SET(CMAKE_C_COMPILER ${BROOT}/host/usr/bin/arm-buildroot-linux-gnueabihf-gcc)
42 SET(CMAKE_CXX_COMPILER ${BROOT}/host/usr/bin/arm-buildroot-linux-gnueabihf-g++)
44 # where is the target environment
45 SET(CMAKE_FIND_ROOT_PATH ${BROOT}/target ${BROOT}/host)
47 SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY)
48 SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
49 SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
50 ```
52 ## Build options
54 You can use the following cmake flags to control the build. Use `-DFLAG=VALUE` to set them.
56 Option name | Values | Default | Notes
57 --------------------- | ------------- | -------- | --------
58 CMAKE_BUILD_TYPE | Release/Debug | Release |
59 LIBKMS_ENABLE_PYTHON | ON/OFF | ON |
60 LIBKMS_ENABLE_KMSCUBEĀ | ON/OFF | OFF |
62 ## Env variables
64 You can use the following runtime environmental variables to control the behavior of libkms.
66 Variable | Description
67 --------------------------------- | -------------
68 LIBKMSXX_DISABLE_UNIVERSAL_PLANES | Set to disable the use of universal planes
69 LIBKMSXX_DISABLE_ATOMIC | Set to disable the use of atomic modesetting