| 1 |
# Copyright 2026 Google |
| 2 |
# SPDX-License-Identifier: MIT |
| 3 |
|
| 4 |
inc_gfxstream_android = include_directories('include') |
| 5 |
deps_gfxstream_android = [dependency('android-utils')] |
| 6 |
if host_machine.system() == 'android' |
| 7 |
dep_android_minigbm_headers = dependency('android-minigbm-headers') |
| 8 |
dep_android_nativebase_headers = dependency('android-nativebase-headers') |
| 9 |
dep_android_aemu_gralloc_headers = dependency('android-aemu-gralloc-headers') |
| 10 |
|
| 11 |
files_gfxstream_android = files( |
| 12 |
'ANativeWindowAndroid.cpp', |
| 13 |
'GfxStreamGralloc.cpp', |
| 14 |
'GrallocGoldfish.cpp', |
| 15 |
'GrallocMinigbm.cpp', |
| 16 |
) |
| 17 |
|
| 18 |
deps_gfxstream_android += [ |
| 19 |
dep_android_minigbm_headers, |
| 20 |
dep_android_nativebase_headers, |
| 21 |
dep_android_aemu_gralloc_headers, |
| 22 |
] |
| 23 |
else |
| 24 |
files_gfxstream_android = files( |
| 25 |
'ANativeWindowEmulated.cpp', |
| 26 |
'GrallocEmulated.cpp', |
| 27 |
) |
| 28 |
endif |
| 29 |
|
| 30 |
libgfxstream_guest_android = static_library( |
| 31 |
'gfxstream_android', |
| 32 |
files_gfxstream_android, |
| 33 |
cpp_args: gfxstream_guest_args, |
| 34 |
include_directories: [inc_gfxstream_android, inc_platform_virtgpu, inc_src, inc_include], |
| 35 |
link_with: [libplatform_virtgpu], |
| 36 |
dependencies: deps_gfxstream_android + dep_android, |
| 37 |
) |
| 38 |
|
| 39 |
idep_gfxstream_guest_android = declare_dependency( |
| 40 |
link_with: libgfxstream_guest_android, |
| 41 |
include_directories: inc_gfxstream_android, |
| 42 |
) |
| 43 |
|
| 44 |
gfxstream_deps += idep_gfxstream_guest_android |