Support installing khrplatform.h again

Currently the KHR header is depended by mesa's EGL/GLES/GL headers, and
would be provided in mesa-common-dev.

So for the usage of mixing mesa's GL with mali's EGL/GLES, we have to
leave it to mesa's version and let mali uses it's own.

But for people who doesn't want mesa, let's add an option to allow
installing it in mali.

Change-Id: Id6e88e2d7f3c4f6092a3cf1f1078a6a7f284f823
Suggested-by: Gleb Mazovetskiy <glex.spb@gmail.com>
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
This commit is contained in:
Jeffy Chen 2021-01-30 04:27:08 +08:00
parent 2d3dce5e7e
commit c3b4a820e1
3 changed files with 17 additions and 6 deletions

View file

@ -26,9 +26,9 @@
/* Khronos platform-specific types and definitions. /* Khronos platform-specific types and definitions.
* *
* The master copy of mali_khrplatform.h is maintained in the Khronos EGL * The master copy of khrplatform.h is maintained in the Khronos EGL
* Registry repository at https://github.com/KhronosGroup/EGL-Registry * Registry repository at https://github.com/KhronosGroup/EGL-Registry
* The last semantic modification to mali_khrplatform.h was at commit ID: * The last semantic modification to khrplatform.h was at commit ID:
* 67a3e0864c2d75ea5287b9f3d2eb74a745936692 * 67a3e0864c2d75ea5287b9f3d2eb74a745936692
* *
* Adopters may modify this file to suit their platform. Adopters are * Adopters may modify this file to suit their platform. Adopters are
@ -43,12 +43,12 @@
* http://www.khronos.org/registry/implementers_guide.pdf * http://www.khronos.org/registry/implementers_guide.pdf
* *
* This file should be included as * This file should be included as
* #include <KHR/mali_khrplatform.h> * #include <KHR/khrplatform.h>
* by Khronos client API header files that use its types and defines. * by Khronos client API header files that use its types and defines.
* *
* The types in mali_khrplatform.h should only be used to define API-specific types. * The types in khrplatform.h should only be used to define API-specific types.
* *
* Types defined in mali_khrplatform.h: * Types defined in khrplatform.h:
* khronos_int8_t signed 8 bit * khronos_int8_t signed 8 bit
* khronos_uint8_t unsigned 8 bit * khronos_uint8_t unsigned 8 bit
* khronos_int16_t signed 16 bit * khronos_int16_t signed 16 bit
@ -71,7 +71,7 @@
* an enum. Client APIs which use an integer or other type for * an enum. Client APIs which use an integer or other type for
* booleans cannot use this as the base type for their boolean. * booleans cannot use this as the base type for their boolean.
* *
* Tokens defined in mali_khrplatform.h: * Tokens defined in khrplatform.h:
* *
* KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values. * KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values.
* *

View file

@ -209,6 +209,15 @@ if get_option('with-overlay')
endif endif
endif endif
# Install optional KHR header
if get_option('khr-header')
install_data(
'include/KHR/mali_khrplatform.h',
install_dir : get_option('includedir') / 'KHR',
install_mode : ['rw-r--r--', 'root'],
rename : 'khrplatform.h')
endif
# Install target libraries and replace the dummy one # Install target libraries and replace the dummy one
install_data(libs, install_dir : get_option('libdir')) install_data(libs, install_dir : get_option('libdir'))
meson.add_install_script('postinst.sh', get_option('libdir'), default_lib) meson.add_install_script('postinst.sh', get_option('libdir'), default_lib)

View file

@ -12,3 +12,5 @@ option('with-overlay', type: 'boolean', value: 'false',
description: 'install overlay (default: false)') description: 'install overlay (default: false)')
option('opencl-icd', type: 'boolean', value: 'true', option('opencl-icd', type: 'boolean', value: 'true',
description: 'OpenCL Installable Client Driver (ICD) (default: true)') description: 'OpenCL Installable Client Driver (ICD) (default: true)')
option('khr-header', type: 'boolean', value: 'false',
description: 'Install KHR header (default: false)')