• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2023 Android Open Source Project
2# SPDX-License-Identifier: MIT
3
4inc_cereal = include_directories('cereal')
5inc_cereal_common = include_directories('cereal/common')
6inc_vulkan_server = include_directories('.')
7
8subdir('cereal')
9subdir('emulated_textures')
10
11files_lib_vulkan_server = files(
12  'BorrowedImageVk.cpp',
13  'BufferVk.cpp',
14  'ColorBufferVk.cpp',
15  'CompositorVk.cpp',
16  'DeviceLostHelper.cpp',
17  'DeviceOpTracker.cpp',
18  'DisplayVk.cpp',
19  'DisplaySurfaceVk.cpp',
20  'PostWorkerVk.cpp',
21  'DebugUtilsHelper.cpp',
22  'SwapChainStateVk.cpp',
23  'RenderThreadInfoVk.cpp',
24  'VkAndroidNativeBuffer.cpp',
25  'VkCommonOperations.cpp',
26  'VkDecoder.cpp',
27  'VkEmulatedPhysicalDeviceMemory.cpp',
28  'VkEmulatedPhysicalDeviceQueue.cpp',
29  'VkDecoderGlobalState.cpp',
30  'VkDecoderSnapshot.cpp',
31  'VkDecoderSnapshotUtils.cpp',
32  'VkFormatUtils.cpp',
33  'VkReconstruction.cpp',
34  'VulkanBoxedHandles.cpp',
35  'VulkanDispatch.cpp',
36  'VulkanHandleMapping.cpp',
37  'VulkanStream.cpp',
38  'vk_util.cpp'
39)
40
41vulkan_server_cpp_args = [
42  '-fvisibility=hidden',
43  '-Wno-inconsistent-missing-override',
44  '-Wno-unused-value',
45  '-Wno-return-type',
46  '-Wno-return-type-c-linkage',
47  '-Wno-uninitialized',
48  '-DVK_GFXSTREAM_STRUCTURE_TYPE_EXT',
49]
50
51# Shouldn't these be defined by standard Vulkan headers?
52if host_machine.system() == 'darwin'
53  vulkan_server_cpp_args += '-DVK_USE_PLATFORM_METAL_EXT'
54elif host_machine.system() == 'windows'
55  vulkan_server_cpp_args += '-DVK_USE_PLATFORM_WIN32_KHR'
56elif host_machine.system() == 'qnx'
57  vulkan_server_cpp_args += '-DVK_USE_PLATFORM_SCREEN_QNX'
58endif
59
60lib_vulkan_server = static_library(
61  'lib_vulkan_server',
62  files_lib_vulkan_server,
63  cpp_args: vulkan_server_cpp_args + gfxstream_host_args,
64  include_directories: [inc_root, inc_gfxstream_include, inc_include, inc_utils, inc_apigen_codec,
65                        inc_cereal, inc_cereal_common, inc_stream_servers,
66                        inc_vulkan_server, inc_renderdoc_external,
67                        inc_gl_host_common, inc_vulkan_headers, inc_glm, inc_host_backend,
68                        inc_host_features, inc_host_tracing, inc_common_utils],
69  link_with: [lib_vulkan_cereal, lib_emulated_textures, lib_host_backend, lib_host_features,
70              lib_host_tracing],
71  dependencies: [aemu_base_dep, aemu_common_dep, aemu_snapshot_dep]
72)
73