1# Copyright 2023 Android Open Source Project
2# SPDX-License-Identifier: MIT
3
4project('gfxstream', 'cpp', 'c',
5         version : '0.1.2',
6         license : 'MIT OR Apache-2.0',
7         default_options : ['cpp_std=gnu++17',
8                            'b_ndebug=if-release'])
9
10cc = meson.get_compiler('cpp')
11prog_python = import('python').find_installation('python3')
12
13#================#
14# Subdirectories #
15#================#
16
17build = get_option('gfxstream-build')
18
19with_guest = build.contains('guest') or build.contains('both')
20with_host = build.contains('host') or build.contains('both')
21with_guest_test = build.contains('guest-test')
22
23#========================#
24# Logging + error report #
25#========================#
26log_level = get_option('log-level')
27
28#===============#
29# Decoders      #
30#===============#
31decoders = get_option('decoders')
32
33use_auto = decoders.contains('auto') and with_host
34use_gles = decoders.contains('gles') and with_host
35use_vulkan = decoders.contains('vulkan') and with_host
36use_magma = decoders.contains('magma') and with_host
37use_composer = decoders.contains('composer') and with_host
38
39if with_guest or with_guest_test
40  genvk = files('codegen/vulkan/vulkan-docs-next/scripts/genvk.py')
41  vk_xml_gfxstream = files('codegen/vulkan/vulkan-docs-next/xml/vk.xml')
42  vk_gfxstream_xml = files('codegen/vulkan/vulkan-docs-next/xml/vk_gfxstream.xml')
43  subdir('guest')
44endif
45if with_host and not with_guest_test
46  subdir('common')
47  subdir('host')
48endif
49
50#================#
51# Summary        #
52#================#
53
54summary({'c_args': (' ').join(get_option('c_args')),
55         'cpp_args': (' ').join(get_option('cpp_args')),
56         'buildtype': get_option('buildtype'),
57         'log-level': log_level,
58         'gles': use_gles,
59         'vulkan': use_vulkan,
60         'magma': use_magma,
61         'composer': use_composer,
62        }, section: 'Configuration')
63