1# Copyright 2023 Android Open Source Project
2# SPDX-License-Identifier: MIT
3
4files_lib_gl_host_common = files(
5  'opengles.cpp',
6  'opengl/EmuglBackendList.cpp',
7  'opengl/emugl_config.cpp',
8  'opengl/GLProcessPipe.cpp',
9  'opengl/GpuFrameBridge.cpp',
10  'opengl/gpuinfo.cpp',
11  'opengl/logger.cpp',
12  'opengl/misc.cpp',
13  'opengl/OpenglEsPipe.cpp',
14)
15
16files_gl_host_common_darwin = files(
17  'opengl/macTouchOpenGL.m',
18  'opengl/NativeGpuInfo_darwin.cpp',
19)
20
21files_gl_host_common_win32 = files(
22  'opengl/NativeGpuInfo_windows.cpp',
23)
24
25files_gl_host_common_linux = files(
26  'opengl/NativeGpuInfo_linux.cpp',
27)
28
29files_gl_host_common_qnx = files(
30  'opengl/NativeGpuInfo_qnx.cpp',
31)
32
33# HACK: For the misc.h file already in AEMU host common
34inc_gl_host_common = include_directories('include')
35
36if host_machine.system() == 'darwin'
37  files_lib_gl_host_common += files_gl_host_common_darwin
38elif host_machine.system() == 'windows'
39  files_lib_gl_host_common += files_gl_host_common_win32
40elif host_machine.system() == 'linux'
41  files_lib_gl_host_common += files_gl_host_common_linux
42elif host_machine.system() == 'qnx'
43  files_lib_gl_host_common += files_gl_host_common_qnx
44endif
45
46lib_gl_host_common = static_library(
47  'gl_host_common',
48  files_lib_gl_host_common,
49  cpp_args: gfxstream_host_args,
50  include_directories: [inc_gfxstream_include, inc_include, inc_gl_host_common, inc_host_features],
51  dependencies: [aemu_base_dep, aemu_common_dep, aemu_snapshot_dep],
52  link_with: [lib_host_features]
53)
54