Dylan Baker | d199225 | 2017-09-14 17:57:17 -0700 | [diff] [blame] | 1 | # Copyright © 2017 Intel Corporation |
| 2 | |
| 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy |
| 4 | # of this software and associated documentation files (the "Software"), to deal |
| 5 | # in the Software without restriction, including without limitation the rights |
| 6 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 7 | # copies of the Software, and to permit persons to whom the Software is |
| 8 | # furnished to do so, subject to the following conditions: |
| 9 | |
| 10 | # The above copyright notice and this permission notice shall be included in |
| 11 | # all copies or substantial portions of the Software. |
| 12 | |
| 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 15 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 16 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 17 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 18 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
| 19 | # SOFTWARE. |
| 20 | |
Kristian H. Kristensen | 932f51d | 2020-07-28 15:25:49 -0700 | [diff] [blame] | 21 | inc_include = [include_directories('.')] |
Dylan Baker | 6b4c704 | 2017-11-13 17:58:51 -0800 | [diff] [blame] | 22 | inc_d3d9 = include_directories('D3D9') |
Alexander von Gluck IV | 834d221 | 2018-02-16 16:56:31 -0600 | [diff] [blame] | 23 | inc_haikugl = include_directories('HaikuGL') |
Dylan Baker | 3218056 | 2017-09-20 20:11:32 -0700 | [diff] [blame] | 24 | |
Kristian H. Kristensen | 932f51d | 2020-07-28 15:25:49 -0700 | [diff] [blame] | 25 | # Most things assume that Android headers are in the default include |
| 26 | # path when compiling for Android so add the stub headers to |
| 27 | # inc_include when using the stub. |
| 28 | if with_android_stub |
| 29 | inc_include += [include_directories('android_stub')] |
| 30 | endif |
| 31 | |
Eric Engestrom | 6e21dcc | 2019-09-25 17:38:49 +0100 | [diff] [blame] | 32 | if not with_glvnd |
Eric Engestrom | 34ba363 | 2019-09-30 14:08:29 +0100 | [diff] [blame] | 33 | if with_gles1 or with_gles2 or with_opengl or with_egl |
| 34 | install_headers('KHR/khrplatform.h', subdir : 'KHR') |
| 35 | endif |
Eric Engestrom | b9a5fb1 | 2019-09-30 13:40:22 +0100 | [diff] [blame] | 36 | |
Eric Engestrom | 34ba363 | 2019-09-30 14:08:29 +0100 | [diff] [blame] | 37 | if with_gles1 |
| 38 | install_headers( |
| 39 | 'GLES/egl.h', |
| 40 | 'GLES/gl.h', |
| 41 | 'GLES/glext.h', |
| 42 | 'GLES/glplatform.h', |
| 43 | subdir : 'GLES', |
| 44 | ) |
| 45 | endif |
Dylan Baker | 3218056 | 2017-09-20 20:11:32 -0700 | [diff] [blame] | 46 | |
Eric Engestrom | 34ba363 | 2019-09-30 14:08:29 +0100 | [diff] [blame] | 47 | if with_gles2 |
| 48 | install_headers( |
| 49 | 'GLES2/gl2.h', |
| 50 | 'GLES2/gl2ext.h', |
| 51 | 'GLES2/gl2platform.h', |
| 52 | subdir : 'GLES2', |
| 53 | ) |
| 54 | install_headers( |
| 55 | 'GLES3/gl3.h', |
| 56 | 'GLES3/gl31.h', |
| 57 | 'GLES3/gl32.h', |
| 58 | 'GLES3/gl3ext.h', |
| 59 | 'GLES3/gl3platform.h', |
| 60 | subdir : 'GLES3', |
| 61 | ) |
| 62 | endif |
Dylan Baker | 3218056 | 2017-09-20 20:11:32 -0700 | [diff] [blame] | 63 | |
Eric Engestrom | 34ba363 | 2019-09-30 14:08:29 +0100 | [diff] [blame] | 64 | if with_opengl |
| 65 | install_headers( |
| 66 | 'GL/gl.h', |
| 67 | 'GL/glcorearb.h', |
| 68 | 'GL/glext.h', |
| 69 | subdir : 'GL', |
| 70 | ) |
| 71 | endif |
Dylan Baker | 3218056 | 2017-09-20 20:11:32 -0700 | [diff] [blame] | 72 | |
Eric Engestrom | 34ba363 | 2019-09-30 14:08:29 +0100 | [diff] [blame] | 73 | if with_glx != 'disabled' |
| 74 | install_headers( |
| 75 | 'GL/glx.h', |
| 76 | 'GL/glxext.h', |
| 77 | subdir : 'GL') |
| 78 | endif |
Dylan Baker | 3218056 | 2017-09-20 20:11:32 -0700 | [diff] [blame] | 79 | |
Eric Engestrom | 34ba363 | 2019-09-30 14:08:29 +0100 | [diff] [blame] | 80 | if with_egl |
| 81 | install_headers( |
| 82 | 'EGL/egl.h', |
| 83 | 'EGL/eglext.h', |
| 84 | 'EGL/eglplatform.h', |
| 85 | subdir : 'EGL', |
| 86 | ) |
| 87 | endif |
Eric Engestrom | 1a7e965 | 2019-09-30 14:06:07 +0100 | [diff] [blame] | 88 | endif |
| 89 | |
| 90 | # Non-upstream headers |
| 91 | if with_egl |
| 92 | install_headers( |
Eric Engestrom | daae003 | 2019-09-30 14:00:51 +0100 | [diff] [blame] | 93 | 'EGL/eglmesaext.h', |
| 94 | 'EGL/eglextchromium.h', |
Dylan Baker | 108d257 | 2017-10-18 12:20:43 -0700 | [diff] [blame] | 95 | subdir : 'EGL', |
| 96 | ) |
| 97 | endif |
Dylan Baker | 91244db | 2017-11-30 10:37:11 -0800 | [diff] [blame] | 98 | |
Eric Engestrom | b9a5fb1 | 2019-09-30 13:40:22 +0100 | [diff] [blame] | 99 | if with_osmesa != 'none' |
| 100 | install_headers('GL/osmesa.h', subdir : 'GL') |
| 101 | endif |
| 102 | |
Dylan Baker | 91244db | 2017-11-30 10:37:11 -0800 | [diff] [blame] | 103 | if with_dri |
| 104 | install_headers('GL/internal/dri_interface.h', subdir : 'GL/internal') |
| 105 | endif |
Dylan Baker | 6b4c704 | 2017-11-13 17:58:51 -0800 | [diff] [blame] | 106 | |
| 107 | if with_gallium_st_nine |
| 108 | install_headers( |
| 109 | 'd3dadapter/d3dadapter9.h', 'd3dadapter/drm.h', 'd3dadapter/present.h', |
| 110 | subdir : 'd3dadapter', |
| 111 | ) |
| 112 | endif |
Dylan Baker | 42ea063 | 2017-12-08 15:26:00 -0800 | [diff] [blame] | 113 | |
Alexander von Gluck IV | 834d221 | 2018-02-16 16:56:31 -0600 | [diff] [blame] | 114 | if with_platform_haiku |
| 115 | install_headers( |
| 116 | 'HaikuGL/GLRenderer.h', 'HaikuGL/GLView.h', 'HaikuGL/OpenGLKit.h', |
| 117 | subdir : 'opengl', |
| 118 | ) |
| 119 | endif |
| 120 | |
Dylan Baker | 42ea063 | 2017-12-08 15:26:00 -0800 | [diff] [blame] | 121 | # Only install the headers if we are building a stand alone implementation and |
| 122 | # not an ICD enabled implementation |
| 123 | if with_gallium_opencl and not with_opencl_icd |
| 124 | install_headers( |
| 125 | 'CL/cl.h', |
| 126 | 'CL/cl.hpp', |
Pierre Moreau | dddc564 | 2018-01-28 11:38:46 +0100 | [diff] [blame] | 127 | 'CL/cl2.hpp', |
Dylan Baker | 42ea063 | 2017-12-08 15:26:00 -0800 | [diff] [blame] | 128 | 'CL/cl_d3d10.h', |
| 129 | 'CL/cl_d3d11.h', |
| 130 | 'CL/cl_dx9_media_sharing.h', |
Pierre Moreau | dddc564 | 2018-01-28 11:38:46 +0100 | [diff] [blame] | 131 | 'CL/cl_dx9_media_sharing_intel.h', |
Dylan Baker | 42ea063 | 2017-12-08 15:26:00 -0800 | [diff] [blame] | 132 | 'CL/cl_egl.h', |
| 133 | 'CL/cl_ext.h', |
Pierre Moreau | dddc564 | 2018-01-28 11:38:46 +0100 | [diff] [blame] | 134 | 'CL/cl_ext_intel.h', |
Dylan Baker | 42ea063 | 2017-12-08 15:26:00 -0800 | [diff] [blame] | 135 | 'CL/cl_gl.h', |
| 136 | 'CL/cl_gl_ext.h', |
Pierre Moreau | cd1c661 | 2019-12-17 17:23:43 +0100 | [diff] [blame] | 137 | 'CL/cl_icd.h', |
Dylan Baker | 42ea063 | 2017-12-08 15:26:00 -0800 | [diff] [blame] | 138 | 'CL/cl_platform.h', |
Pierre Moreau | dddc564 | 2018-01-28 11:38:46 +0100 | [diff] [blame] | 139 | 'CL/cl_va_api_media_sharing_intel.h', |
| 140 | 'CL/cl_version.h', |
Dylan Baker | 42ea063 | 2017-12-08 15:26:00 -0800 | [diff] [blame] | 141 | 'CL/opencl.h', |
| 142 | subdir: 'CL' |
| 143 | ) |
| 144 | endif |
Dylan Baker | e231920 | 2018-03-02 10:28:11 -0800 | [diff] [blame] | 145 | |
| 146 | if with_intel_vk |
| 147 | install_headers('vulkan/vulkan_intel.h', subdir : 'vulkan') |
| 148 | endif |