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