blob: ccf1cd8332eb90948e43478a44ede1127491c72d [file] [log] [blame]
# Copyright 2021 The Cobalt Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# The egl_and_gles GN target can be depended upon in order to
# depend on a platform-specific implementation of EGL/GLES, whether that
# ultimately ends up being Angle on Windows, system libraries on Linux, or a
# custom implementation of EGL/GLES on an exotic platform. Depending on this
# target will set dependent settings to have the EGL and GLES system headers in
# their include directories.
#
# This decision is predicated on the value of the |gl_type| GN variable defined
# in the configuration.gni for the current platform.
group("egl_and_gles") {
deps = [ ":egl_and_gles_$gl_type" ]
}
group("egl_and_gles_system_gles2") {
# Use the system-provided implementation of GLES2.
}
declare_args() {
enable_d3d11_feature_level_11 = false
}
config("egl_and_gles_angle_config") {
include_dirs = [ "//third_party/angle/include" ]
if (is_win && enable_d3d11_feature_level_11) {
defines = [ "GL_GLEXT_PROTOTYPES" ]
}
}
if (gl_type == "angle") {
group("egl_and_gles_angle") {
public_deps = [
"//third_party/angle:libEGL",
"//third_party/angle:libGLESv2",
]
public_configs = [ ":egl_and_gles_angle_config" ]
}
}