# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

# In an is_component_build build, everything can link against //mojo/gles2
# because it is built as a shared library. However, in a static build,
# //mojo/gles2 is linked into an executable (e.g., mojo_shell), and must be
# injected into other shared libraries (i.e., Mojo Apps) that need the mojo
# gles2 API.
#
# For component targets, add //mojo/public/gles2:for_component to your deps
# section.
#
# For shared_library targets (e.g., a Mojo App), add
# //mojo/public/gles2:for_shared_library to your deps

group("for_shared_library") {
  public_configs = [ "//third_party/khronos:khronos_headers" ]
  public_deps = [ "//mojo/public/c/gles2" ]

  if (is_component_build) {
    deps = [ "//mojo/gles2" ]
  } else {
    deps = [ "//mojo/public/platform/native:gles2_thunks" ]
  }
}

group("for_component") {
  public_configs = [ "//third_party/khronos:khronos_headers" ]
  public_deps = [ "//mojo/public/c/gles2" ]

  if (is_component_build) {
    deps = [ "//mojo/gles2" ]
  }
}