Path: blob/21.2-virgl/src/gallium/drivers/zink/meson.build
4570 views
# Copyright © 2018 Collabora Ltd12# Permission is hereby granted, free of charge, to any person obtaining a copy3# of this software and associated documentation files (the "Software"), to deal4# in the Software without restriction, including without limitation the rights5# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell6# copies of the Software, and to permit persons to whom the Software is7# furnished to do so, subject to the following conditions:89# The above copyright notice and this permission notice shall be included in10# all copies or substantial portions of the Software.1112# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR13# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,14# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE15# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER16# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,17# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE18# SOFTWARE.1920files_libzink = files(21'nir_lower_dynamic_bo_access.c',22'nir_to_spirv/nir_to_spirv.c',23'nir_to_spirv/spirv_builder.c',24'zink_batch.c',25'zink_blit.c',26'zink_clear.c',27'zink_compiler.c',28'zink_context.c',29'zink_descriptors.c',30'zink_descriptors_lazy.c',31'zink_draw.c',32'zink_fence.c',33'zink_format.c',34'zink_framebuffer.c',35'zink_pipeline.c',36'zink_program.c',37'zink_query.c',38'zink_render_pass.c',39'zink_resource.c',40'zink_screen.c',41'zink_state.c',42'zink_surface.c',43)4445zink_device_info = custom_target(46'zink_device_info.c',47input : ['zink_device_info.py'],48output : ['zink_device_info.h', 'zink_device_info.c'],49command : [50prog_python, '@INPUT@', '@OUTPUT@', join_paths(meson.source_root(), 'src/vulkan/registry/vk.xml')51]52)5354zink_instance = custom_target(55'zink_instance.c',56input : ['zink_instance.py'],57output : ['zink_instance.h', 'zink_instance.c'],58command : [59prog_python, '@INPUT@', '@OUTPUT@', join_paths(meson.source_root(), 'src/vulkan/registry/vk.xml')60]61)6263zink_nir_algebraic_c = custom_target(64'zink_nir_algebraic.c',65input : 'nir_to_spirv/zink_nir_algebraic.py',66output : 'zink_nir_algebraic.c',67command : [68prog_python, '@INPUT@',69'-p', join_paths(meson.source_root(), 'src/compiler/nir/'),70],71capture : true,72depend_files : nir_algebraic_py,73)7475zink_c_args = []76inc_zink_vk = []7778if with_swrast_vk79zink_c_args += '-DZINK_WITH_SWRAST_VK'80endif8182# MoltenVK options83if with_moltenvk_dir != ''84inc_zink_vk = [inc_zink_vk, include_directories( join_paths(with_moltenvk_dir, 'include') )]85zink_c_args += ['-x','objective-c'] # Put compiler into objective-C mode to allow for MacOS types, like IOSurface and CAMetalLayer86zink_c_args += ['-iframework' , 'Foundation']87endif8889libzink = static_library(90'zink',91[files_libzink, zink_device_info, zink_instance, zink_nir_algebraic_c, vk_dispatch_table],92gnu_symbol_visibility : 'hidden',93include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_vulkan_wsi, inc_vulkan_util, inc_zink_vk],94dependencies: [dep_vulkan, idep_nir_headers, idep_mesautil, idep_vulkan_util_headers],95c_args: zink_c_args,96)9798driver_zink = declare_dependency(99compile_args : '-DGALLIUM_ZINK',100link_with : [libzink],101)102103if with_tests104test(105'zink_format_test',106executable(107'zink_format_test',108['zink_format_test.c', 'zink_format.c'],109dependencies : [idep_mesautil, idep_vulkan_util],110include_directories : [inc_gallium, inc_gallium_aux, inc_include, inc_src],111),112suite : ['zink'],113)114endif115116117