1# Copyright © 2017, 2019 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 21XVMC_MAJOR = 1 22XVMC_MINOR = 0 23 24libxvmc_st = static_library( 25 'xvmc_st', 26 files('attributes.c', 'block.c', 'context.c', 'surface.c', 'subpicture.c'), 27 gnu_symbol_visibility : 'hidden', 28 include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux], 29 dependencies : [ 30 dep_xvmc, dep_x11_xcb, dep_xcb, dep_xcb_dri2, dep_xcb_dri3, dep_xv, 31 dep_libdrm, 32 ], 33) 34 35# These tests will not work without a working xvmc configuration. 36if with_tools.contains('xvmc') 37 # pkg-config was added in 1.0.12, so allow fallback 38 dep_xvmcw = dependency('xvmc-wrapper', required : false) 39 if not dep_xvmcw.found() 40 dep_xvmcw = cc.find_library('XvMCW') 41 endif 42 dep_real_xvmc = dependency('xvmc') 43 44 foreach x : ['context', 'surface', 'subpicture', 'blocks', 'rendering'] 45 _name = 'xvmc_@0@'.format(x) 46 executable( 47 _name, 48 files('tests/test_@0@.c'.format(x), 'tests/testlib.c'), 49 dependencies : [ 50 dep_real_xvmc, dep_x11_xcb, dep_xcb, dep_xcb_dri2, dep_xcb_dri3, 51 dep_xvmcw, dep_xv, 52 ], 53 install: true, 54 ) 55 endforeach 56 57 executable( 58 'xvmc_bench', 59 files('tests/xvmc_bench.c', 'tests/testlib.c'), 60 dependencies : [ 61 dep_real_xvmc, dep_x11_xcb, dep_xcb, dep_xcb_dri2, dep_xcb_dri3, 62 dep_xvmcw, dep_xv, 63 ], 64 install: true, 65 ) 66endif 67