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 21vk_api_xml = files('registry/vk.xml') 22 23vulkan_icd_link_args = [] 24vulkan_icd_link_depends = [] 25 26if with_platform_android 27 vulkan_icd_symbols = files('vulkan-icd-android-symbols.txt') 28 if with_ld_version_script 29 vulkan_icd_link_args += ['-Wl,--version-script', join_paths(meson.current_source_dir(), 'vulkan-android.sym')] 30 vulkan_icd_link_depends += files('vulkan-android.sym') 31 endif 32else 33 vulkan_icd_symbols = files('vulkan-icd-symbols.txt') 34 if with_ld_version_script 35 vulkan_icd_link_args += ['-Wl,--version-script', join_paths(meson.current_source_dir(), 'vulkan.sym')] 36 vulkan_icd_link_depends += files('vulkan.sym') 37 endif 38endif 39 40inc_vulkan_util = include_directories('util') 41 42vulkan_wsi_deps = [] 43vulkan_wsi_list = [] 44 45vulkan_api_def = custom_target( 46 'vulkan_api.def', 47 input: 'vulkan_api.def.in', 48 output : 'vulkan_api.def', 49 command : gen_vs_module_defs_normal_command, 50) 51 52if with_platform_x11 53 vulkan_wsi_deps += [ 54 dep_xcb, 55 dep_x11_xcb, 56 dep_xcb_dri3, 57 dep_xcb_present, 58 dep_xcb_xfixes, 59 dep_xcb_sync, 60 dep_xcb_xrandr, 61 dep_xcb_shm, 62 dep_xshmfence, 63 ] 64 vulkan_wsi_list += '-DVK_USE_PLATFORM_XCB_KHR' 65 vulkan_wsi_list += '-DVK_USE_PLATFORM_XLIB_KHR' 66 if with_xcb_keysyms 67 vulkan_wsi_deps += dep_xcb_keysyms 68 endif 69endif 70if with_platform_wayland 71 vulkan_wsi_deps += dep_wayland_client 72 vulkan_wsi_list += '-DVK_USE_PLATFORM_WAYLAND_KHR' 73endif 74if system_has_kms_drm and not with_platform_android 75 vulkan_wsi_deps += [dep_libdrm] 76 vulkan_wsi_list += '-DVK_USE_PLATFORM_DISPLAY_KHR' 77endif 78if with_xlib_lease 79 vulkan_wsi_deps += [dep_xlib_xrandr] 80 vulkan_wsi_list += '-DVK_USE_PLATFORM_XLIB_XRANDR_EXT' 81endif 82if with_platform_android 83 vulkan_wsi_list += '-DVK_USE_PLATFORM_ANDROID_KHR' 84endif 85if with_platform_windows 86 vulkan_wsi_list += '-DVK_USE_PLATFORM_WIN32_KHR' 87endif 88if host_machine.system() == 'darwin' 89 vulkan_wsi_list += '-DVK_USE_PLATFORM_MACOS_MVK' 90 vulkan_wsi_list += '-DVK_USE_PLATFORM_METAL_EXT' 91endif 92 93idep_vulkan_wsi_defines = declare_dependency( 94 compile_args : vulkan_wsi_list, 95) 96vulkan_wsi_deps += idep_vulkan_wsi_defines 97 98subdir('util') 99subdir('runtime') 100subdir('wsi') 101if with_vulkan_overlay_layer 102 subdir('overlay-layer') 103endif 104if with_vulkan_device_select_layer 105 subdir('device-select-layer') 106endif 107