Path: blob/21.2-virgl/src/intel/common/meson.build
4547 views
# Copyright © 2017 Intel Corporation12# 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_libintel_common = files(21'intel_aux_map.c',22'intel_aux_map.h',23'intel_buffer_alloc.h',24'intel_clflush.h',25'intel_decoder.h',26'intel_disasm.c',27'intel_disasm.h',28'intel_gem.c',29'intel_gem.h',30'intel_guardband.h',31'intel_l3_config.c',32'intel_l3_config.h',33'intel_urb_config.c',34'intel_sample_positions.c',35'intel_sample_positions.h',36'intel_uuid.c',37'intel_uuid.h',38'intel_measure.c',39'intel_measure.h',40)4142files_batch_decoder = files(43'intel_batch_decoder.c',44'intel_decoder.c',45)4647batch_decoder_dependencies = []48if with_platform_android49files_libintel_common += 'intel_batch_decoder_stub.c'50else51batch_decoder_dependencies += dep_expat52files_libintel_common += files_batch_decoder53endif5455libintel_common = static_library(56'intel_common',57[files_libintel_common, genX_xml_h, sha1_h],58include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_intel],59c_args : [no_override_init_args],60gnu_symbol_visibility : 'hidden',61link_with : [libisl],62dependencies : [batch_decoder_dependencies, dep_libdrm, dep_thread, idep_genxml, idep_mesautil],63)6465libintel_extra_dependencies = []66if with_platform_android67libintel_extra_dependencies += dep_android68endif6970idep_libintel_common = declare_dependency(71link_with: [libintel_common],72dependencies: [libintel_extra_dependencies],73)7475install_intel_gpu_tests = get_option('install-intel-gpu-tests')7677if install_intel_gpu_tests78foreach g : [['70', 'gfx7'], ['75', 'hsw'], ['80', 'gfx8'],79['90', 'gfx9'], ['110', 'gfx11'], ['120', 'gfx12'],80['125', 'gfx125']]81executable(82'intel_@0@_mi_builder_test'.format(g[1]),83files('tests/mi_builder_test.cpp'),84cpp_args : [85cpp_msvc_compat_args,86'-DGFX_VERx10=@0@'.format(g[0])87],88gnu_symbol_visibility : 'hidden',89include_directories : [inc_include, inc_src, inc_intel],90link_with : [libintel_dev],91dependencies : [dep_libdrm, idep_gtest, idep_genxml, idep_mesautil],92install : install_intel_gpu_tests,93)94endforeach95endif9697if with_tests98gentest_xml = files('tests/gentest.xml')99_name = 'gentest_pack.h'100gentest_pack = custom_target(101_name,102input : [gen_pack_header_py, gentest_xml],103output : _name,104command : [prog_python, '@INPUT@'],105capture : true,106)107108genxml_path = join_paths(meson.source_root(),109'@0@'.format(gentest_xml[0]))110111test(112'genxml_test',113executable(114'genxml_test',115['tests/genxml_test.c', gentest_pack],116include_directories : [inc_include, inc_src, inc_intel],117dependencies : idep_mesautil,118link_with : libintel_common,119c_args : [120'-DGENXML_PATH="@0@"'.format(genxml_path)121],122),123args : ['-quiet'],124suite : ['intel'],125)126endif127128129