1# EMU defines its own host common but then also includes the 2# host directory (which includes this directory). Avoid a double 3# include/define. 4if (NOT TARGET gfxstream-gl-host-common) 5 add_library(gfxstream-gl-host-common.headers INTERFACE) 6 target_include_directories( 7 gfxstream-gl-host-common.headers 8 INTERFACE include ${GFXSTREAM_REPO_ROOT}/include) 9 target_link_libraries( 10 gfxstream-gl-host-common.headers 11 INTERFACE 12 aemu-host-common.headers 13 aemu-base.headers 14 gfxstream_features.headers 15 gfxstream-snapshot.headers 16 gfxstream_egl_headers) 17 18 if (APPLE) 19 set(gl-host-common-opengles-platform-sources 20 opengl/macTouchOpenGL.m 21 opengl/NativeGpuInfo_darwin.cpp) 22 elseif (WIN32) 23 set(gl-host-common-opengles-platform-sources 24 opengl/NativeGpuInfo_windows.cpp) 25 else() 26 set(gl-host-common-opengles-platform-sources 27 opengl/NativeGpuInfo_linux.cpp) 28 endif() 29 30 if (BUILD_STANDALONE) 31 add_library( 32 gfxstream-gl-host-common 33 STATIC 34 35 # emugl glue 36 opengl/misc.cpp 37 38 # general opengles host stuff, incl process pipe 39 # and opengl es pipe 40 opengles.cpp 41 opengl/EmuglBackendList.cpp 42 # opengl/EmuglBackendList_unittest.cpp 43 opengl/emugl_config.cpp 44 # opengl/emugl_config_unittest.cpp 45 opengl/GLProcessPipe.cpp 46 opengl/GpuFrameBridge.cpp 47 # opengl/GpuFrameBridge_unittest.cpp 48 opengl/gpuinfo.cpp 49 # opengl/gpuinfo_unittest.cpp 50 opengl/logger.cpp 51 opengl/OpenglEsPipe.cpp 52 ${gl-host-common-opengles-platform-sources} 53 ) 54 target_link_libraries( 55 gfxstream-gl-host-common 56 PUBLIC 57 gfxstream-gl-host-common.headers) 58 endif() 59endif()