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
21inc_include = [include_directories('.')]
22inc_d3d9 = include_directories('D3D9')
23inc_haikugl = include_directories('HaikuGL')
24
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.
28if with_android_stub
29  inc_include += [include_directories('android_stub')]
30endif
31
32if not with_glvnd
33  if with_gles1 or with_gles2 or with_opengl or with_egl
34    install_headers('KHR/khrplatform.h', subdir : 'KHR')
35  endif
36
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
46
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
63
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
72
73  if with_glx != 'disabled'
74    install_headers(
75      'GL/glx.h',
76      'GL/glxext.h',
77      subdir : 'GL')
78  endif
79
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
88endif
89
90# Non-upstream headers
91if with_egl
92  install_headers(
93    'EGL/eglmesaext.h',
94    'EGL/eglextchromium.h',
95    subdir : 'EGL',
96  )
97endif
98
99if with_osmesa
100  install_headers('GL/osmesa.h', subdir : 'GL')
101endif
102
103if with_dri
104  install_headers('GL/internal/dri_interface.h', subdir : 'GL/internal')
105endif
106
107if with_gallium_st_nine
108  install_headers(
109    'd3dadapter/d3dadapter9.h', 'd3dadapter/drm.h', 'd3dadapter/present.h',
110    subdir : 'd3dadapter',
111  )
112endif
113
114if with_platform_haiku
115  install_headers(
116    'HaikuGL/GLRenderer.h', 'HaikuGL/GLView.h', 'HaikuGL/OpenGLKit.h',
117    subdir : 'opengl',
118  )
119endif
120
121# Only install the headers if we are building a stand alone implementation and
122# not an ICD enabled implementation
123if with_gallium_opencl and not with_opencl_icd
124  install_headers(
125    'CL/cl.h',
126    'CL/cl.hpp',
127    'CL/cl2.hpp',
128    'CL/cl_d3d10.h',
129    'CL/cl_d3d11.h',
130    'CL/cl_dx9_media_sharing.h',
131    'CL/cl_dx9_media_sharing_intel.h',
132    'CL/cl_egl.h',
133    'CL/cl_ext.h',
134    'CL/cl_ext_intel.h',
135    'CL/cl_gl.h',
136    'CL/cl_gl_ext.h',
137    'CL/cl_icd.h',
138    'CL/cl_platform.h',
139    'CL/cl_va_api_media_sharing_intel.h',
140    'CL/cl_version.h',
141    'CL/opencl.h',
142    subdir: 'CL'
143  )
144endif
145