• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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)
22
23if (WIN32)
24    add_library(
25        EGL_translator_static
26        ${egl-translator-common-sources}
27        ${egl-translator-windows-sources})
28elseif (APPLE)
29    add_library(
30        EGL_translator_static
31        ${egl-translator-common-sources}
32        ${egl-translator-darwin-sources})
33else()
34    add_library(
35        EGL_translator_static
36        ${egl-translator-common-sources}
37        ${egl-translator-linux-sources})
38endif()
39
40target_link_libraries(EGL_translator_static PUBLIC GLcommon apigen-codec-common)
41target_link_libraries(
42    EGL_translator_static
43    PRIVATE aemu-base.headers aemu-host-common.headers)
44target_link_libraries(EGL_translator_static PUBLIC GLES_CM_translator_static GLES_V2_translator_static)
45if (NOT MSVC)
46    target_compile_options(EGL_translator_static PRIVATE -fvisibility=hidden)
47endif()
48target_compile_options(
49    EGL_translator_static
50    PRIVATE -Wno-inconsistent-missing-override -Wno-macro-redefined)
51
52if (APPLE)
53    target_compile_options(EGL_translator_static PRIVATE -Wno-deprecated-declarations)
54    target_compile_options(EGL_translator_static PRIVATE "-Wno-deprecated-declarations")
55endif()
56
57if (WIN32)
58elseif (APPLE)
59    target_link_libraries(EGL_translator_static PUBLIC "-framework AppKit -framework IOSurface")
60else()
61    target_link_libraries(EGL_translator_static PUBLIC "-lGL -lX11 -ldl -lpthread")
62endif()
63