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 |
|
---|
21 | inc_include = [include_directories('.')]
|
---|
22 | inc_d3d9 = include_directories('D3D9')
|
---|
23 |
|
---|
24 | # Most things assume that Android headers are in the default include
|
---|
25 | # path when compiling for Android so add the stub headers to
|
---|
26 | # inc_include when using the stub.
|
---|
27 | if with_android_stub
|
---|
28 | inc_include += [include_directories('android_stub')]
|
---|
29 | endif
|
---|
30 |
|
---|
31 | if not with_glvnd and host_machine.system() != 'windows'
|
---|
32 | if with_gles1 or with_gles2 or with_opengl or with_egl
|
---|
33 | install_headers('KHR/khrplatform.h', subdir : 'KHR')
|
---|
34 | endif
|
---|
35 |
|
---|
36 | if with_gles1
|
---|
37 | install_headers(
|
---|
38 | 'GLES/egl.h',
|
---|
39 | 'GLES/gl.h',
|
---|
40 | 'GLES/glext.h',
|
---|
41 | 'GLES/glplatform.h',
|
---|
42 | subdir : 'GLES',
|
---|
43 | )
|
---|
44 | endif
|
---|
45 |
|
---|
46 | if with_gles2
|
---|
47 | install_headers(
|
---|
48 | 'GLES2/gl2.h',
|
---|
49 | 'GLES2/gl2ext.h',
|
---|
50 | 'GLES2/gl2platform.h',
|
---|
51 | subdir : 'GLES2',
|
---|
52 | )
|
---|
53 | install_headers(
|
---|
54 | 'GLES3/gl3.h',
|
---|
55 | 'GLES3/gl31.h',
|
---|
56 | 'GLES3/gl32.h',
|
---|
57 | 'GLES3/gl3ext.h',
|
---|
58 | 'GLES3/gl3platform.h',
|
---|
59 | subdir : 'GLES3',
|
---|
60 | )
|
---|
61 | endif
|
---|
62 |
|
---|
63 | if with_opengl
|
---|
64 | install_headers(
|
---|
65 | 'GL/gl.h',
|
---|
66 | 'GL/glcorearb.h',
|
---|
67 | 'GL/glext.h',
|
---|
68 | subdir : 'GL',
|
---|
69 | )
|
---|
70 | endif
|
---|
71 |
|
---|
72 | if with_glx != 'disabled'
|
---|
73 | install_headers(
|
---|
74 | 'GL/glx.h',
|
---|
75 | 'GL/glxext.h',
|
---|
76 | subdir : 'GL')
|
---|
77 | endif
|
---|
78 |
|
---|
79 | if with_egl
|
---|
80 | install_headers(
|
---|
81 | 'EGL/egl.h',
|
---|
82 | 'EGL/eglext.h',
|
---|
83 | 'EGL/eglplatform.h',
|
---|
84 | subdir : 'EGL',
|
---|
85 | )
|
---|
86 | endif
|
---|
87 | endif
|
---|
88 |
|
---|
89 | # Non-upstream headers
|
---|
90 | if with_egl
|
---|
91 | install_headers(
|
---|
92 | 'EGL/eglext_angle.h',
|
---|
93 | 'EGL/eglmesaext.h',
|
---|
94 | subdir : 'EGL',
|
---|
95 | )
|
---|
96 | endif
|
---|
97 |
|
---|
98 | if with_osmesa
|
---|
99 | install_headers('GL/osmesa.h', subdir : 'GL')
|
---|
100 | endif
|
---|
101 |
|
---|
102 | if with_dri
|
---|
103 | install_headers('GL/internal/dri_interface.h', subdir : 'GL/internal')
|
---|
104 | endif
|
---|
105 |
|
---|
106 | if with_gallium_st_nine
|
---|
107 | install_headers(
|
---|
108 | 'd3dadapter/d3dadapter9.h', 'd3dadapter/drm.h', 'd3dadapter/present.h',
|
---|
109 | subdir : 'd3dadapter',
|
---|
110 | )
|
---|
111 | endif
|
---|
112 |
|
---|
113 | opencl_headers = files(
|
---|
114 | 'CL/cl.h',
|
---|
115 | 'CL/cl.hpp',
|
---|
116 | 'CL/cl2.hpp',
|
---|
117 | 'CL/cl_d3d10.h',
|
---|
118 | 'CL/cl_d3d11.h',
|
---|
119 | 'CL/cl_dx9_media_sharing.h',
|
---|
120 | 'CL/cl_dx9_media_sharing_intel.h',
|
---|
121 | 'CL/cl_egl.h',
|
---|
122 | 'CL/cl_ext.h',
|
---|
123 | 'CL/cl_ext_intel.h',
|
---|
124 | 'CL/cl_gl.h',
|
---|
125 | 'CL/cl_gl_ext.h',
|
---|
126 | 'CL/cl_icd.h',
|
---|
127 | 'CL/cl_platform.h',
|
---|
128 | 'CL/cl_va_api_media_sharing_intel.h',
|
---|
129 | 'CL/cl_version.h',
|
---|
130 | 'CL/opencl.h',
|
---|
131 | 'CL/opencl.hpp',
|
---|
132 | )
|
---|
133 | # Only install the headers if we are building a stand alone implementation and
|
---|
134 | # not an ICD enabled implementation
|
---|
135 | if with_gallium_opencl and not with_opencl_icd
|
---|
136 | install_headers(
|
---|
137 | opencl_headers,
|
---|
138 | subdir: 'CL'
|
---|
139 | )
|
---|
140 | endif
|
---|