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 13add_library( 14 gfxstream-host-common 15 STATIC 16 17 # emugl glue 18 crash_reporter.cpp 19 vm_operations.cpp 20 feature_control.cpp 21 dma_device.cpp 22 sync_device.cpp 23 misc.cpp 24 window_operations.cpp 25 26 # What used to be android-emu 27 AndroidPipe.cpp 28 HostmemIdMapping.cpp 29 RefcountPipe.cpp 30 AndroidAgentFactory.cpp 31 32 # goldfish sync 33 GoldfishSyncCommandQueue.cpp 34 goldfish_sync.cpp 35 36 # goldfish dma 37 DmaMap.cpp 38 GoldfishDma.cpp 39 40 # Address space device 41 address_space_device_control_ops.cpp 42 address_space_device.cpp 43 address_space_host_memory_allocator.cpp 44 address_space_shared_slots_host_memory_allocator.cpp 45 address_space_graphics.cpp 46 address_space_host_media.cpp 47 48 # android-emu avd globals 49 avd/info.cpp 50 avd/hw-config.cpp 51 52 # general opengles host stuff, incl process pipe 53 # and opengl es pipe 54 opengles.cpp 55 opengl/EmuglBackendList.cpp 56 # opengl/EmuglBackendList_unittest.cpp 57 opengl/emugl_config.cpp 58 # opengl/emugl_config_unittest.cpp 59 opengl/GLProcessPipe.cpp 60 opengl/GpuFrameBridge.cpp 61 # opengl/GpuFrameBridge_unittest.cpp 62 opengl/gpuinfo.cpp 63 # opengl/gpuinfo_unittest.cpp 64 opengl/logger.cpp 65 opengl/OpenglEsPipe.cpp 66 ${gfxstream-host-common-opengles-platform-sources} 67 68 ) 69target_include_directories( 70 gfxstream-host-common 71 PRIVATE 72 ${GFXSTREAM_REPO_ROOT} 73 ${GFXSTREAM_REPO_ROOT}/include 74 ${GFXSTREAM_REPO_ROOT}/stream-servers) 75target_link_libraries( 76 gfxstream-host-common 77 PRIVATE 78 gfxstream-base) 79 80# Tests 81add_library( 82 gfxstream-host-common-testing-support 83 testing/HostAddressSpace.cpp 84 testing/MockAndroidAgentFactory.cpp 85 testing/MockAndroidEmulatorWindowAgent.cpp 86 testing/MockAndroidMultiDisplayAgent.cpp 87 testing/MockAndroidVmOperations.cpp) 88target_include_directories( 89 gfxstream-host-common-testing-support 90 PRIVATE 91 ${GFXSTREAM_REPO_ROOT}) 92target_link_libraries( 93 gfxstream-host-common-testing-support 94 PRIVATE 95 gtest 96 gmock) 97 98add_executable( 99 gfxstream-host-common_unittests 100 address_space_graphics_unittests.cpp 101 address_space_host_memory_allocator_unittests.cpp 102 address_space_shared_slots_host_memory_allocator_unittests.cpp 103 HostAddressSpace_unittest.cpp 104 HostmemIdMapping_unittest.cpp) 105target_link_libraries( 106 gfxstream-host-common_unittests 107 PRIVATE 108 gfxstream-base 109 gfxstream-host-common 110 gfxstream-host-common-testing-support 111 gtest_main) 112