1set(egl-translator-common-sources 2 ClientAPIExts.cpp 3 EglConfig.cpp 4 EglContext.cpp 5 EglDisplay.cpp 6 EglGlobalInfo.cpp 7 EglImp.cpp 8 EglPbufferSurface.cpp 9 EglSurface.cpp 10 EglThreadInfo.cpp 11 EglValidate.cpp 12 EglWindowSurface.cpp 13 ShaderCache.cpp 14 ThreadInfo.cpp) 15set(egl-translator-windows-sources 16 CoreProfileConfigs_windows.cpp EglOsApi_egl.cpp EglOsApi_wgl.cpp) 17set(egl-translator-darwin-sources 18 EglOsApi_darwin.cpp EglOsApi_egl.cpp MacNative.m 19 MacPixelFormatsAttribs.m) 20set(egl-translator-linux-sources 21 CoreProfileConfigs_linux.cpp EglOsApi_egl.cpp EglOsApi_glx.cpp X11ErrorHandler.cpp) 22set(egl-translator-qnx-sources 23 EglOsApi_egl.cpp) 24if (WIN32) 25 add_library( 26 EGL_translator_static 27 ${egl-translator-common-sources} 28 ${egl-translator-windows-sources}) 29elseif (APPLE) 30 add_library( 31 EGL_translator_static 32 ${egl-translator-common-sources} 33 ${egl-translator-darwin-sources}) 34elseif (QNX) 35 add_library( 36 EGL_translator_static 37 ${egl-translator-common-sources} 38 ${egl-translator-qnx-sources}) 39else() 40 add_library( 41 EGL_translator_static 42 ${egl-translator-common-sources} 43 ${egl-translator-linux-sources}) 44endif() 45 46target_link_libraries(EGL_translator_static PUBLIC GLcommon apigen-codec-common) 47target_link_libraries( 48 EGL_translator_static 49 PRIVATE aemu-base.headers aemu-host-common.headers) 50target_link_libraries(EGL_translator_static PUBLIC GLES_CM_translator_static GLES_V2_translator_static) 51if (NOT MSVC) 52 target_compile_options(EGL_translator_static PRIVATE -fvisibility=hidden) 53endif() 54target_compile_options( 55 EGL_translator_static 56 PRIVATE -Wno-inconsistent-missing-override -Wno-macro-redefined) 57 58if (APPLE) 59 target_compile_options(EGL_translator_static PRIVATE -Wno-deprecated-declarations) 60 target_compile_options(EGL_translator_static PRIVATE "-Wno-deprecated-declarations") 61endif() 62 63if (WIN32) 64elseif (APPLE) 65 target_link_libraries(EGL_translator_static PUBLIC "-framework AppKit -framework IOSurface") 66elseif (QNX) 67 target_link_libraries(EGL_translator_static PUBLIC "-lscreen -lregex -lEGL -lGLESv2") 68else() 69 target_link_libraries(EGL_translator_static PUBLIC "-ldl -lpthread") 70endif() 71