1# Copyright © 2018 Rob Clark 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_freedreno = include_directories(['.', './registers', './registers/adreno', './common']) 22inc_freedreno_rnn = include_directories('rnn') 23 24rnn_src_path = dir_source_root + '/src/freedreno/registers' 25rnn_install_path = get_option('datadir') + '/freedreno/registers' 26rnn_path = rnn_src_path + ':' + get_option('prefix') + '/' + rnn_install_path 27 28dep_lua = dependency('lua54', 'lua53', 'lua52', 'lua', required: false, 29 allow_fallback: true, version: '>=5.2') 30 31dep_libarchive = dependency('libarchive', allow_fallback: true, required: false) 32dep_libxml2 = dependency('libxml-2.0', allow_fallback: true, required: false) 33prog_gzip = find_program('gzip', required: false) 34 35install_fd_decode_tools = dep_libxml2.found() and prog_gzip.found() and \ 36 with_tools.contains('freedreno') 37 38subdir('registers') 39subdir('common') 40subdir('isa') 41subdir('ir2') 42subdir('ir3') 43subdir('fdl') 44 45if system_has_kms_drm 46 subdir('drm') 47endif 48 49subdir('perfcntrs') 50 51if system_has_kms_drm 52 subdir('computerator') 53endif 54 55if with_perfetto and (with_datasources.contains('freedreno') or with_datasources.contains('auto')) 56 subdir('ds') 57endif 58 59# Everything that depends on rnn requires (indirectly) libxml2: 60if dep_libxml2.found() and with_tools.contains('freedreno') 61 subdir('rnn') 62 subdir('decode') 63 subdir('afuc') 64elif with_tools.contains('freedreno') 65 message('libxml2 not found, skipping tools that depend on it') 66endif 67 68if with_tools.contains('drm-shim') 69 subdir('drm-shim') 70endif 71 72if with_freedreno_vk 73 subdir('vulkan') 74endif 75