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_winddk = include_directories('winddk') 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 and host_machine.system() != 'windows' 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/eglext_angle.h', 94 'EGL/eglmesaext.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 114opencl_headers = files( 115 'CL/cl.h', 116 'CL/cl.hpp', 117 'CL/cl2.hpp', 118 'CL/cl_d3d10.h', 119 'CL/cl_d3d11.h', 120 'CL/cl_dx9_media_sharing.h', 121 'CL/cl_dx9_media_sharing_intel.h', 122 'CL/cl_egl.h', 123 'CL/cl_ext.h', 124 'CL/cl_ext_intel.h', 125 'CL/cl_gl.h', 126 'CL/cl_gl_ext.h', 127 'CL/cl_icd.h', 128 'CL/cl_platform.h', 129 'CL/cl_va_api_media_sharing_intel.h', 130 'CL/cl_version.h', 131 'CL/opencl.h', 132 'CL/opencl.hpp', 133) 134# Only install the headers if we are building a stand alone implementation and 135# not an ICD enabled implementation 136if with_gallium_opencl and not with_opencl_icd 137 install_headers( 138 opencl_headers, 139 subdir: 'CL' 140 ) 141endif 142