Debian Codegraph @

src/gfxstream/guest/meson.build

raw
1 # Copyright 2022 Android Open Source Project
2 # SPDX-License-Identifier: MIT
3
4 #===============#
5 # Options #
6 #===============#
7
8 with_vulkan_icd_dir = get_option('vulkan-icd-dir')
9 if with_vulkan_icd_dir == ''
10 with_vulkan_icd_dir = join_paths(get_option('datadir'), 'vulkan/icd.d')
11 endif
12
13 #===============#
14 # Configuration #
15 #===============#
16 gfxstream_guest_args = cpp_msvc_compat_args + ['-D_FILE_OFFSET_BITS=64']
17
18 # Our internal guest build
19 if host_machine.system() == 'windows'
20 gfxstream_guest_args += '-DWINDOWS_GUEST_BUILD'
21 elif host_machine.system() != 'fuchsia'
22 gfxstream_guest_args += '-DLINUX_GUEST_BUILD'
23 endif
24
25 # Include the gfxstream private VkStructureType definitions
26 gfxstream_guest_args += '-DVK_GFXSTREAM_STRUCTURE_TYPE_EXT'
27
28 gfxstream_guest_args += '-DVK_BASE_VERSION_1_0'
29 gfxstream_guest_args += '-DVK_GRAPHICS_VERSION_1_0'
30 gfxstream_guest_args += '-DVK_COMPUTE_VERSION_1_0'
31
32 gfxstream_guest_args += '-DVK_BASE_VERSION_1_1'
33 gfxstream_guest_args += '-DVK_GRAPHICS_VERSION_1_1'
34 gfxstream_guest_args += '-DVK_COMPUTE_VERSION_1_1'
35
36 gfxstream_guest_args += '-DVK_BASE_VERSION_1_2'
37 gfxstream_guest_args += '-DVK_GRAPHICS_VERSION_1_2'
38 gfxstream_guest_args += '-DVK_COMPUTE_VERSION_1_2'
39
40 gfxstream_guest_args += '-DVK_BASE_VERSION_1_3'
41 gfxstream_guest_args += '-DVK_GRAPHICS_VERSION_1_3'
42 gfxstream_guest_args += '-DVK_COMPUTE_VERSION_1_3'
43
44 gfxstream_guest_args += '-DVK_BASE_VERSION_1_4'
45 gfxstream_guest_args += '-DVK_GRAPHICS_VERSION_1_4'
46 gfxstream_guest_args += '-DVK_COMPUTE_VERSION_1_4'
47
48 if with_gfxstream_emulated_android
49 gfxstream_guest_args += '-DEND2END_TESTS'
50 endif
51
52 if with_platform_android
53 gfxstream_guest_args += '-DGFXSTREAM_ENABLE_GUEST_GOLDFISH'
54 endif
55
56 #====================================#
57 # Standard deps #
58 #====================================#
59 gfxstream_deps = [
60 dep_libdrm,
61 idep_mesautil,
62 idep_vulkan_wsi_headers,
63 idep_vulkan_lite_runtime,
64 idep_vulkan_util_headers,
65 idep_vulkan_wsi,
66 dep_valgrind,
67 ]
68
69 if with_perfetto
70 gfxstream_deps += dep_perfetto
71 endif
72
73 #====================================#
74 # Android deps (mostly Goldfish) #
75 # Only works with meson2hermetic #
76 #====================================#
77 dep_android_base = null_dep
78 dep_android_arect = null_dep
79 dep_android_aemu_base = null_dep
80 dep_android_aemu_gl_codec = null_dep
81 dep_android_aemu_qemupipe = null_dep
82 dep_android_aemu_ringbuffer = null_dep
83 dep_android_aemu_rc_encoder = null_dep
84 if with_platform_android or with_gfxstream_emulated_android
85 gfxstream_guest_args += '-DVK_USE_PLATFORM_ANDROID_KHR'
86 dep_android_base = dependency('android-base')
87 dep_android_arect = dependency('android-arect')
88 dep_android_aemu_base = dependency('android-aemu-base')
89 dep_android_aemu_gl_codec = dependency('android-aemu-gl-codec')
90 dep_android_aemu_qemupipe = dependency('android-aemu-qemupipe')
91 dep_android_aemu_ringbuffer = dependency('android-aemu-ringbuffer')
92 dep_android_aemu_rc_encoder = dependency('android-aemu-rc-encoder')
93
94 gfxstream_deps += dep_android
95 gfxstream_deps += [
96 dep_android_base,
97 dep_android_arect,
98 dep_android_aemu_base,
99 dep_android_aemu_gl_codec,
100 dep_android_aemu_ringbuffer,
101 dep_android_aemu_rc_encoder,
102 dep_android_aemu_qemupipe,
103 ]
104 endif
105
106 #===============#
107 # Includes #
108 #===============#
109
110 inc_vulkan_headers = include_directories('../../../include/vulkan')
111 inc_vulkan_enc = include_directories('vulkan_enc')
112
113 #================#
114 # Subdirectories #
115 #================#
116 subdir('iostream')
117 subdir('platform')
118 subdir('GoldfishAddressSpace')
119 subdir('connection-manager')
120
121 if with_platform_android or with_gfxstream_emulated_android
122 subdir('android')
123 endif
124
125 subdir('vulkan_enc')
126 subdir('vulkan')