• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1if (APPLE)
2    set(gfxstream-host-common-opengles-platform-sources
3        opengl/macTouchOpengl.m
4        opengl/NativeGpuInfo_darwin.cpp)
5elseif (WIN32)
6    set(gfxstream-host-common-opengles-platform-sources
7        opengl/NativeGpuInfo_windows.cpp)
8else()
9    set(gfxstream-host-common-opengles-platform-sources
10        opengl/NativeGpuInfo_linux.cpp)
11endif()
12
13if (RECORDER_DELEGATE_LIB)
14    set(gfxstream-base-metrics-sources
15        ../base/MetricsRecorderDelegate.cpp)
16    set(gfxstream-base-metrics-link-libraries
17        recorder_delegate_lib)
18else()
19    set(gfxstream-base-metrics-sources
20        ../base/MetricsNoOp.cpp)
21    set(gfxstream-base-metrics-link-libraries)
22endif()
23
24# TODO(gregschlom) move this to base
25add_library(logging-base
26    STATIC
27    logging.cpp
28    GfxstreamFatalError.cpp
29    ${gfxstream-base-metrics-sources})
30target_include_directories(
31    logging-base
32    PRIVATE
33    ${GFXSTREAM_REPO_ROOT}
34    ${GFXSTREAM_REPO_ROOT}/include)
35target_link_libraries(
36    logging-base
37    PRIVATE
38    ${gfxstream-base-metrics-link-libraries})
39
40add_library(
41    gfxstream-host-common
42    STATIC
43
44    # emugl glue
45    crash_reporter.cpp
46    vm_operations.cpp
47    feature_control.cpp
48    dma_device.cpp
49    sync_device.cpp
50    misc.cpp
51    window_operations.cpp
52
53    # What used to be android-emu
54    AndroidPipe.cpp
55    HostmemIdMapping.cpp
56    RefcountPipe.cpp
57    AndroidAgentFactory.cpp
58
59    # goldfish sync
60    GoldfishSyncCommandQueue.cpp
61    goldfish_sync.cpp
62
63    # goldfish dma
64    DmaMap.cpp
65    GoldfishDma.cpp
66
67    # Address space device
68    address_space_device_control_ops.cpp
69    address_space_device.cpp
70    address_space_host_memory_allocator.cpp
71    address_space_shared_slots_host_memory_allocator.cpp
72    address_space_graphics.cpp
73    address_space_host_media.cpp
74
75    # android-emu avd globals
76    avd/info.cpp
77    avd/hw-config.cpp
78
79    # general opengles host stuff, incl process pipe
80    # and opengl es pipe
81    opengles.cpp
82    opengl/EmuglBackendList.cpp
83    # opengl/EmuglBackendList_unittest.cpp
84    opengl/emugl_config.cpp
85    # opengl/emugl_config_unittest.cpp
86    opengl/GLProcessPipe.cpp
87    opengl/GpuFrameBridge.cpp
88    # opengl/GpuFrameBridge_unittest.cpp
89    opengl/gpuinfo.cpp
90    # opengl/gpuinfo_unittest.cpp
91    opengl/logger.cpp
92    opengl/OpenglEsPipe.cpp
93    ${gfxstream-host-common-opengles-platform-sources}
94    )
95
96target_include_directories(
97    gfxstream-host-common
98    PRIVATE
99    ${GFXSTREAM_REPO_ROOT}
100    ${GFXSTREAM_REPO_ROOT}/include
101    ${GFXSTREAM_REPO_ROOT}/stream-servers)
102target_link_libraries(
103    gfxstream-host-common
104    PRIVATE
105    gfxstream-base
106    logging-base
107)
108
109# Tests
110add_library(
111    gfxstream-host-common-testing-support
112    testing/HostAddressSpace.cpp
113    testing/MockAndroidAgentFactory.cpp
114    testing/MockAndroidEmulatorWindowAgent.cpp
115    testing/MockAndroidMultiDisplayAgent.cpp
116    testing/MockAndroidVmOperations.cpp)
117target_include_directories(
118    gfxstream-host-common-testing-support
119    PRIVATE
120    ${GFXSTREAM_REPO_ROOT})
121target_link_libraries(
122    gfxstream-host-common-testing-support
123    PRIVATE
124    gtest
125    gmock)
126
127add_executable(
128    gfxstream-host-common_unittests
129    address_space_graphics_unittests.cpp
130    address_space_host_memory_allocator_unittests.cpp
131    address_space_shared_slots_host_memory_allocator_unittests.cpp
132    HostAddressSpace_unittest.cpp
133    HostmemIdMapping_unittest.cpp
134    logging_unittest.cpp
135    GfxstreamFatalError_unittest.cpp
136    RenderDoc_unittest.cpp)
137
138target_include_directories(
139    gfxstream-host-common_unittests
140    PRIVATE
141    ${GFXSTREAM_REPO_ROOT}/include)
142
143target_link_libraries(
144    gfxstream-host-common_unittests
145    PRIVATE
146    gfxstream-base
147    gfxstream-host-common
148    gfxstream-host-common-testing-support
149    gtest_main
150    gmock_main)
151
152gtest_discover_tests(gfxstream-host-common_unittests)
153
154set_test_include_files()
155