# Workaround for bug 1208774 (spurious link errors on 32bit g++)
string (REPLACE " -Wl,--no-undefined" " " CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS})
include_directories(${GLESv2_INCLUDE_DIRS})

set(
  GRAPHICS_SOURCES

  egl_extensions.cpp
  egl_resources.cpp
  display_configuration.cpp
  buffer_basic.cpp
  pixel_format_utils.cpp
  overlapping_output_grouping.cpp
)

add_library(
  mirplatformgraphicscommon STATIC

  ${GRAPHICS_SOURCES}
)

target_link_libraries(
  mirplatformgraphicscommon
  mirsharedgeometry

  ${EGL_LDFLAGS} ${EGL_LIBRARIES}
)

if (MIR_BUILD_PLATFORM_ANDROID)
  add_subdirectory(android/)
endif()

if (MIR_BUILD_PLATFORM_MESA)
  add_subdirectory(mesa/)
endif()

