2015-09-01 17:32:30 +03:00
|
|
|
# Copyright 2014-2015 The Chromium Authors. All rights reserved.
|
2014-06-23 23:13:02 +04:00
|
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
|
|
# found in the LICENSE file.
|
|
|
|
|
2015-05-26 18:32:58 +03:00
|
|
|
# import the use_x11 variable
|
2016-05-27 15:35:36 +03:00
|
|
|
import("//build/config/dcheck_always_on.gni")
|
2016-06-13 23:39:01 +03:00
|
|
|
import("//build/config/linux/pkg_config.gni")
|
2015-05-26 18:32:58 +03:00
|
|
|
import("//build/config/ui.gni")
|
2016-06-16 17:24:50 +03:00
|
|
|
import("//testing/libfuzzer/fuzzer_test.gni")
|
2015-09-01 17:32:30 +03:00
|
|
|
import("//third_party/angle/build/angle_common.gni")
|
2016-07-07 20:17:47 +03:00
|
|
|
import("//ui/ozone/ozone.gni")
|
2015-05-26 18:32:58 +03:00
|
|
|
|
2016-07-07 20:17:47 +03:00
|
|
|
if (ozone_platform_gbm) {
|
2016-06-28 00:08:28 +03:00
|
|
|
pkg_config("libdrm") {
|
|
|
|
packages = [ "libdrm" ]
|
|
|
|
}
|
2016-06-13 23:39:01 +03:00
|
|
|
}
|
|
|
|
|
2015-07-30 15:34:54 +03:00
|
|
|
angle_git_is_present = exec_script("src/commit_id.py",
|
|
|
|
[
|
|
|
|
"check",
|
|
|
|
rebase_path(".", root_build_dir),
|
|
|
|
],
|
|
|
|
"value")
|
|
|
|
|
|
|
|
angle_use_commit_id = angle_git_is_present == 1
|
|
|
|
|
2016-01-04 19:25:00 +03:00
|
|
|
gles_gypi = exec_script("//build/gypi_to_gn.py",
|
|
|
|
[ rebase_path("src/libGLESv2.gypi") ],
|
|
|
|
"scope",
|
|
|
|
[ "src/libGLESv2.gypi" ])
|
|
|
|
|
|
|
|
compiler_gypi = exec_script("//build/gypi_to_gn.py",
|
|
|
|
[ rebase_path("src/compiler.gypi") ],
|
|
|
|
"scope",
|
|
|
|
[ "src/compiler.gypi" ])
|
2014-07-17 01:19:18 +04:00
|
|
|
|
2014-07-23 04:00:17 +04:00
|
|
|
# This config is exported to dependent targets (and also applied to internal
|
|
|
|
# ones).
|
|
|
|
config("external_config") {
|
2016-01-04 19:25:00 +03:00
|
|
|
include_dirs = [ "include" ]
|
2014-07-23 04:00:17 +04:00
|
|
|
}
|
|
|
|
|
2014-06-23 23:13:02 +04:00
|
|
|
# This config is applied to internal Angle targets (not pushed to dependents).
|
|
|
|
config("internal_config") {
|
|
|
|
include_dirs = [
|
|
|
|
"include",
|
|
|
|
"src",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2016-07-18 17:10:29 +03:00
|
|
|
config("extra_warnings") {
|
|
|
|
# Enable more default warnings on Windows.
|
|
|
|
if (is_win) {
|
|
|
|
cflags = [
|
|
|
|
"/we4244", # Conversion: possible loss of data.
|
|
|
|
"/we4456", # Variable shadowing.
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-02-25 16:34:49 +03:00
|
|
|
if (is_win) {
|
|
|
|
copy("copy_compiler_dll") {
|
2016-01-04 19:25:00 +03:00
|
|
|
sources = [
|
|
|
|
"$windows_sdk_path/Redist/D3D/$target_cpu/d3dcompiler_47.dll",
|
|
|
|
]
|
|
|
|
outputs = [
|
|
|
|
"$root_out_dir/d3dcompiler_47.dll",
|
|
|
|
]
|
2015-02-25 16:34:49 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-07-18 20:47:12 +03:00
|
|
|
angle_undefine_configs = [ "//build/config/compiler:default_include_dirs" ]
|
2016-06-02 20:04:10 +03:00
|
|
|
|
2014-06-23 23:13:02 +04:00
|
|
|
component("translator") {
|
|
|
|
sources = [
|
|
|
|
"src/compiler/translator/ShaderLang.cpp",
|
2014-08-07 20:31:38 +04:00
|
|
|
"src/compiler/translator/ShaderVars.cpp",
|
2014-06-23 23:13:02 +04:00
|
|
|
]
|
|
|
|
|
|
|
|
defines = [ "ANGLE_TRANSLATOR_IMPLEMENTATION" ]
|
|
|
|
|
2016-06-02 20:04:10 +03:00
|
|
|
configs -= angle_undefine_configs
|
2016-07-18 20:47:12 +03:00
|
|
|
configs += [ ":internal_config" ]
|
2014-06-23 23:13:02 +04:00
|
|
|
|
2014-09-24 21:20:56 +04:00
|
|
|
public_deps = [
|
2014-06-23 23:13:02 +04:00
|
|
|
":translator_lib",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
# Holds the shared includes so we only need to list them once.
|
|
|
|
source_set("includes") {
|
|
|
|
sources = [
|
|
|
|
"include/EGL/egl.h",
|
|
|
|
"include/EGL/eglext.h",
|
|
|
|
"include/EGL/eglplatform.h",
|
|
|
|
"include/GLES2/gl2.h",
|
|
|
|
"include/GLES2/gl2ext.h",
|
|
|
|
"include/GLES2/gl2platform.h",
|
|
|
|
"include/GLES3/gl3.h",
|
2015-09-15 20:12:07 +03:00
|
|
|
"include/GLES3/gl31.h",
|
|
|
|
"include/GLES3/gl32.h",
|
2016-01-04 19:25:00 +03:00
|
|
|
"include/GLES3/gl3platform.h",
|
2014-06-23 23:13:02 +04:00
|
|
|
"include/GLSLANG/ShaderLang.h",
|
|
|
|
"include/KHR/khrplatform.h",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
static_library("preprocessor") {
|
2014-07-17 01:19:18 +04:00
|
|
|
sources = rebase_path(compiler_gypi.angle_preprocessor_sources, ".", "src")
|
2014-06-23 23:13:02 +04:00
|
|
|
|
2016-06-02 20:04:10 +03:00
|
|
|
configs -= angle_undefine_configs
|
2016-07-18 20:47:12 +03:00
|
|
|
configs += [ ":internal_config" ]
|
2014-06-23 23:13:02 +04:00
|
|
|
}
|
|
|
|
|
2014-08-07 20:31:38 +04:00
|
|
|
config("translator_static_config") {
|
|
|
|
defines = [ "ANGLE_TRANSLATOR_STATIC" ]
|
2016-06-16 17:24:50 +03:00
|
|
|
if (use_libfuzzer) {
|
|
|
|
defines += [ "ANGLE_TRANSLATOR_DISABLE_POOL_ALLOC" ]
|
|
|
|
}
|
2014-08-07 20:31:38 +04:00
|
|
|
}
|
|
|
|
|
2015-06-17 01:03:14 +03:00
|
|
|
config("debug_annotations_config") {
|
|
|
|
if (is_debug) {
|
2016-01-04 19:25:00 +03:00
|
|
|
defines = [ "ANGLE_ENABLE_DEBUG_ANNOTATIONS" ]
|
2015-06-17 01:03:14 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-05-27 15:35:36 +03:00
|
|
|
config("angle_release_asserts_config") {
|
|
|
|
if (dcheck_always_on) {
|
|
|
|
defines = [ "ANGLE_ENABLE_RELEASE_ASSERTS" ]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-06-02 20:04:10 +03:00
|
|
|
config("angle_common_config") {
|
|
|
|
include_dirs = [ "src/common/third_party/numerics" ]
|
|
|
|
}
|
|
|
|
|
2015-01-14 22:31:02 +03:00
|
|
|
static_library("angle_common") {
|
|
|
|
sources = rebase_path(gles_gypi.libangle_common_sources, ".", "src")
|
2015-06-17 01:03:14 +03:00
|
|
|
|
2016-06-02 20:04:10 +03:00
|
|
|
configs -= angle_undefine_configs
|
2015-01-14 22:31:02 +03:00
|
|
|
configs += [
|
2016-06-02 20:04:10 +03:00
|
|
|
":angle_common_config",
|
2015-06-17 01:03:14 +03:00
|
|
|
":debug_annotations_config",
|
2016-07-18 17:10:29 +03:00
|
|
|
":extra_warnings",
|
2016-06-02 20:04:10 +03:00
|
|
|
":internal_config",
|
2015-01-14 22:31:02 +03:00
|
|
|
]
|
2016-04-06 23:39:52 +03:00
|
|
|
|
2016-05-20 00:59:55 +03:00
|
|
|
public_deps = [
|
|
|
|
":commit_id",
|
|
|
|
]
|
2016-06-02 20:04:10 +03:00
|
|
|
public_configs = [
|
|
|
|
":angle_release_asserts_config",
|
|
|
|
":angle_common_config",
|
|
|
|
]
|
2015-01-14 22:31:02 +03:00
|
|
|
}
|
|
|
|
|
2016-06-13 22:06:31 +03:00
|
|
|
config("angle_image_util_config") {
|
|
|
|
include_dirs = [
|
|
|
|
"include",
|
|
|
|
"src",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2016-07-14 04:01:55 +03:00
|
|
|
static_library("angle_image_util") {
|
2016-06-13 22:06:31 +03:00
|
|
|
sources = rebase_path(gles_gypi.libangle_image_util_sources, ".", "src")
|
|
|
|
|
|
|
|
configs -= angle_undefine_configs
|
2016-07-18 20:47:12 +03:00
|
|
|
configs += [ ":internal_config" ]
|
2016-06-13 22:06:31 +03:00
|
|
|
|
|
|
|
public_configs = [ ":angle_image_util_config" ]
|
|
|
|
|
|
|
|
public_deps = [
|
|
|
|
":angle_common",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2014-06-23 23:13:02 +04:00
|
|
|
static_library("translator_lib") {
|
2014-07-17 01:19:18 +04:00
|
|
|
sources = rebase_path(compiler_gypi.angle_translator_lib_sources, ".", "src")
|
2015-12-11 20:30:15 +03:00
|
|
|
defines = []
|
|
|
|
|
2016-06-16 17:24:50 +03:00
|
|
|
if (angle_enable_essl || use_libfuzzer) {
|
2016-01-04 19:25:00 +03:00
|
|
|
sources +=
|
|
|
|
rebase_path(compiler_gypi.angle_translator_lib_essl_sources, ".", "src")
|
2015-12-11 20:30:15 +03:00
|
|
|
defines += [ "ANGLE_ENABLE_ESSL" ]
|
|
|
|
}
|
|
|
|
|
2016-06-16 17:24:50 +03:00
|
|
|
if (angle_enable_glsl || use_libfuzzer) {
|
2016-01-04 19:25:00 +03:00
|
|
|
sources +=
|
|
|
|
rebase_path(compiler_gypi.angle_translator_lib_glsl_sources, ".", "src")
|
2015-12-11 20:30:15 +03:00
|
|
|
defines += [ "ANGLE_ENABLE_GLSL" ]
|
|
|
|
}
|
2014-06-23 23:13:02 +04:00
|
|
|
|
2016-06-16 17:24:50 +03:00
|
|
|
if (angle_enable_hlsl || use_libfuzzer) {
|
2016-01-04 19:25:00 +03:00
|
|
|
sources +=
|
|
|
|
rebase_path(compiler_gypi.angle_translator_lib_hlsl_sources, ".", "src")
|
2015-12-11 20:30:15 +03:00
|
|
|
defines += [ "ANGLE_ENABLE_HLSL" ]
|
2015-02-25 16:34:49 +03:00
|
|
|
}
|
2016-06-02 20:04:10 +03:00
|
|
|
configs -= angle_undefine_configs
|
2014-06-23 23:13:02 +04:00
|
|
|
configs += [
|
|
|
|
":internal_config",
|
2014-08-07 20:31:38 +04:00
|
|
|
":translator_static_config",
|
2014-06-23 23:13:02 +04:00
|
|
|
]
|
2014-09-24 21:20:56 +04:00
|
|
|
public_configs = [ ":external_config" ]
|
2014-06-23 23:13:02 +04:00
|
|
|
|
|
|
|
deps = [
|
|
|
|
":includes",
|
|
|
|
":preprocessor",
|
|
|
|
]
|
2015-01-14 22:31:02 +03:00
|
|
|
|
|
|
|
public_deps = [
|
|
|
|
":angle_common",
|
|
|
|
]
|
2016-07-18 20:47:12 +03:00
|
|
|
|
|
|
|
if (is_win) {
|
|
|
|
# Necessary to suppress some system header xtree warnigns in Release.
|
|
|
|
# For some reason this warning doesn't get triggered in Chromium
|
|
|
|
cflags = [ "/wd4718" ]
|
|
|
|
}
|
2014-06-23 23:13:02 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
static_library("translator_static") {
|
|
|
|
sources = [
|
|
|
|
"src/compiler/translator/ShaderLang.cpp",
|
2014-07-17 22:16:32 +04:00
|
|
|
"src/compiler/translator/ShaderVars.cpp",
|
2014-06-23 23:13:02 +04:00
|
|
|
]
|
|
|
|
|
2015-02-25 16:34:49 +03:00
|
|
|
if (angle_enable_hlsl) {
|
|
|
|
defines = [ "ANGLE_ENABLE_HLSL" ]
|
|
|
|
}
|
|
|
|
|
2016-06-02 20:04:10 +03:00
|
|
|
configs -= angle_undefine_configs
|
2016-07-18 20:47:12 +03:00
|
|
|
configs += [ ":internal_config" ]
|
2014-09-24 21:20:56 +04:00
|
|
|
public_configs = [ ":translator_static_config" ]
|
2014-06-23 23:13:02 +04:00
|
|
|
|
2014-09-24 21:20:56 +04:00
|
|
|
public_deps = [
|
2014-06-23 23:13:02 +04:00
|
|
|
":translator_lib",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2016-09-16 17:29:54 +03:00
|
|
|
source_set("translator_fuzzer") {
|
2016-06-16 17:24:50 +03:00
|
|
|
sources = [
|
|
|
|
"src/compiler/fuzz/translator_fuzzer.cpp",
|
|
|
|
]
|
|
|
|
|
|
|
|
include_dirs = [
|
|
|
|
"include",
|
|
|
|
"src",
|
|
|
|
]
|
|
|
|
|
|
|
|
deps = [
|
|
|
|
":translator_static",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2014-06-23 23:13:02 +04:00
|
|
|
config("commit_id_config") {
|
|
|
|
include_dirs = [ "$root_gen_dir/angle" ]
|
|
|
|
}
|
|
|
|
|
2015-07-30 15:34:54 +03:00
|
|
|
commit_id_output_file = "$root_gen_dir/angle/id/commit.h"
|
|
|
|
if (angle_use_commit_id) {
|
|
|
|
action("commit_id") {
|
|
|
|
script = "src/commit_id.py"
|
|
|
|
outputs = [
|
|
|
|
commit_id_output_file,
|
|
|
|
]
|
2014-06-23 23:13:02 +04:00
|
|
|
|
2015-07-30 15:34:54 +03:00
|
|
|
args = [
|
|
|
|
"gen",
|
|
|
|
rebase_path(".", root_build_dir),
|
|
|
|
rebase_path(commit_id_output_file, root_build_dir),
|
|
|
|
]
|
2014-06-23 23:13:02 +04:00
|
|
|
|
2015-07-30 15:34:54 +03:00
|
|
|
public_configs = [ ":commit_id_config" ]
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
copy("commit_id") {
|
|
|
|
sources = [
|
|
|
|
"src/commit.h",
|
|
|
|
]
|
|
|
|
outputs = [
|
|
|
|
commit_id_output_file,
|
|
|
|
]
|
|
|
|
public_configs = [ ":commit_id_config" ]
|
|
|
|
}
|
2014-06-23 23:13:02 +04:00
|
|
|
}
|
|
|
|
|
2015-01-14 22:31:02 +03:00
|
|
|
config("libANGLE_config") {
|
2015-02-12 21:39:56 +03:00
|
|
|
cflags = []
|
2015-01-14 22:31:02 +03:00
|
|
|
defines = []
|
|
|
|
if (angle_enable_d3d9) {
|
|
|
|
defines += [ "ANGLE_ENABLE_D3D9" ]
|
|
|
|
}
|
|
|
|
if (angle_enable_d3d11) {
|
|
|
|
defines += [ "ANGLE_ENABLE_D3D11" ]
|
2014-11-19 22:20:15 +03:00
|
|
|
}
|
2015-02-13 23:41:41 +03:00
|
|
|
if (angle_enable_gl) {
|
|
|
|
defines += [ "ANGLE_ENABLE_OPENGL" ]
|
2016-05-05 20:37:38 +03:00
|
|
|
if (use_x11) {
|
|
|
|
defines += [ "ANGLE_USE_X11" ]
|
|
|
|
}
|
2015-05-26 18:32:58 +03:00
|
|
|
}
|
2016-05-25 19:57:39 +03:00
|
|
|
if (angle_enable_vulkan) {
|
|
|
|
defines += [ "ANGLE_ENABLE_VULKAN" ]
|
|
|
|
}
|
2015-01-14 22:31:02 +03:00
|
|
|
defines += [
|
2015-09-15 20:12:07 +03:00
|
|
|
"GL_GLEXT_PROTOTYPES",
|
2015-12-02 23:33:18 +03:00
|
|
|
"EGL_EGLEXT_PROTOTYPES",
|
2015-01-14 22:31:02 +03:00
|
|
|
]
|
2015-09-02 17:30:55 +03:00
|
|
|
|
|
|
|
if (is_win) {
|
|
|
|
defines += [
|
|
|
|
"GL_APICALL=",
|
|
|
|
"EGLAPI=",
|
|
|
|
]
|
|
|
|
} else {
|
|
|
|
defines += [
|
|
|
|
"GL_APICALL=__attribute__((visibility(\"default\")))",
|
|
|
|
"EGLAPI=__attribute__((visibility(\"default\")))",
|
|
|
|
]
|
|
|
|
}
|
2015-02-12 21:39:56 +03:00
|
|
|
if (is_win) {
|
|
|
|
cflags += [ "/wd4530" ] # C++ exception handler used, but unwind semantics are not enabled.
|
|
|
|
}
|
2015-01-14 22:31:02 +03:00
|
|
|
}
|
2014-11-19 22:20:15 +03:00
|
|
|
|
2015-01-14 22:31:02 +03:00
|
|
|
static_library("libANGLE") {
|
|
|
|
sources = rebase_path(gles_gypi.libangle_sources, ".", "src")
|
|
|
|
|
2015-02-13 23:41:41 +03:00
|
|
|
include_dirs = []
|
2015-01-14 22:31:02 +03:00
|
|
|
libs = []
|
2016-01-04 19:25:00 +03:00
|
|
|
defines = [ "LIBANGLE_IMPLEMENTATION" ]
|
2016-06-02 20:04:10 +03:00
|
|
|
public_deps = [
|
2016-03-01 00:37:04 +03:00
|
|
|
":angle_common",
|
2016-06-02 20:04:10 +03:00
|
|
|
]
|
|
|
|
deps = [
|
2016-06-13 22:06:31 +03:00
|
|
|
":angle_image_util",
|
2016-03-01 00:37:04 +03:00
|
|
|
":commit_id",
|
|
|
|
":includes",
|
|
|
|
":translator_static",
|
|
|
|
]
|
|
|
|
|
2015-01-14 22:31:02 +03:00
|
|
|
# Shared D3D sources.
|
|
|
|
if (angle_enable_d3d9 || angle_enable_d3d11) {
|
|
|
|
sources += rebase_path(gles_gypi.libangle_d3d_shared_sources, ".", "src")
|
2014-06-23 23:13:02 +04:00
|
|
|
|
2016-01-04 19:25:00 +03:00
|
|
|
defines += [ "ANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ " + "\"d3dcompiler_47.dll\", \"d3dcompiler_46.dll\", \"d3dcompiler_43.dll\" }" ]
|
2015-01-14 22:31:02 +03:00
|
|
|
}
|
2014-11-19 22:20:15 +03:00
|
|
|
|
2015-01-14 22:31:02 +03:00
|
|
|
if (angle_enable_d3d9) {
|
|
|
|
sources += rebase_path(gles_gypi.libangle_d3d9_sources, ".", "src")
|
|
|
|
libs += [ "d3d9.lib" ]
|
2015-01-09 19:51:16 +03:00
|
|
|
}
|
2015-01-07 21:22:02 +03:00
|
|
|
|
2015-01-14 22:31:02 +03:00
|
|
|
if (angle_enable_d3d11) {
|
|
|
|
sources += rebase_path(gles_gypi.libangle_d3d11_sources, ".", "src")
|
|
|
|
sources += rebase_path(gles_gypi.libangle_d3d11_win32_sources, ".", "src")
|
2016-08-23 19:29:22 +03:00
|
|
|
libs += [ "dxguid.lib" ]
|
2015-01-14 22:31:02 +03:00
|
|
|
}
|
2015-01-07 21:22:02 +03:00
|
|
|
|
2015-02-13 23:41:41 +03:00
|
|
|
if (angle_enable_gl) {
|
|
|
|
sources += rebase_path(gles_gypi.libangle_gl_sources, ".", "src")
|
|
|
|
include_dirs += [ "src/third_party/khronos" ]
|
|
|
|
|
|
|
|
if (is_win) {
|
|
|
|
sources += rebase_path(gles_gypi.libangle_gl_wgl_sources, ".", "src")
|
|
|
|
}
|
2015-05-26 18:32:58 +03:00
|
|
|
if (use_x11) {
|
2015-05-14 17:54:18 +03:00
|
|
|
sources += rebase_path(gles_gypi.libangle_gl_glx_sources, ".", "src")
|
2016-05-20 00:59:55 +03:00
|
|
|
deps += [ "src/third_party/libXNVCtrl:libXNVCtrl" ]
|
2016-03-01 00:37:04 +03:00
|
|
|
libs += [
|
|
|
|
"X11",
|
|
|
|
"Xi",
|
|
|
|
"Xext",
|
|
|
|
]
|
2015-05-14 17:54:18 +03:00
|
|
|
}
|
2016-05-14 00:27:57 +03:00
|
|
|
if (is_mac) {
|
|
|
|
sources += rebase_path(gles_gypi.libangle_gl_cgl_sources, ".", "src")
|
|
|
|
libs += [
|
|
|
|
"Cocoa.framework",
|
|
|
|
"IOSurface.framework",
|
|
|
|
"OpenGL.framework",
|
|
|
|
"QuartzCore.framework",
|
|
|
|
]
|
|
|
|
}
|
2016-06-03 07:18:38 +03:00
|
|
|
if (is_android) {
|
|
|
|
sources += rebase_path(gles_gypi.libangle_gl_egl_sources, ".", "src")
|
|
|
|
sources += rebase_path(gles_gypi.libangle_gl_egl_dl_sources, ".", "src")
|
|
|
|
sources +=
|
|
|
|
rebase_path(gles_gypi.libangle_gl_egl_android_sources, ".", "src")
|
|
|
|
libs += [
|
|
|
|
"android",
|
|
|
|
"log",
|
|
|
|
]
|
|
|
|
}
|
2016-07-07 20:17:47 +03:00
|
|
|
if (ozone_platform_gbm) {
|
2016-06-13 23:39:01 +03:00
|
|
|
configs += [ ":libdrm" ]
|
|
|
|
defines += [ "ANGLE_USE_OZONE" ]
|
|
|
|
deps += [ "//third_party/minigbm" ]
|
|
|
|
sources += rebase_path(gles_gypi.libangle_gl_egl_sources, ".", "src")
|
|
|
|
sources += rebase_path(gles_gypi.libangle_gl_egl_dl_sources, ".", "src")
|
|
|
|
sources += rebase_path(gles_gypi.libangle_gl_ozone_sources, ".", "src")
|
|
|
|
}
|
2015-02-13 23:41:41 +03:00
|
|
|
}
|
|
|
|
|
2016-05-25 19:57:39 +03:00
|
|
|
if (angle_enable_vulkan) {
|
|
|
|
sources += rebase_path(gles_gypi.libangle_vulkan_sources, ".", "src")
|
|
|
|
}
|
|
|
|
|
2015-01-14 22:31:02 +03:00
|
|
|
if (is_debug) {
|
2016-01-04 19:25:00 +03:00
|
|
|
defines += [ "ANGLE_GENERATE_SHADER_DEBUG_INFO" ]
|
2015-01-14 22:31:02 +03:00
|
|
|
}
|
2015-01-07 21:22:02 +03:00
|
|
|
|
2016-06-02 20:04:10 +03:00
|
|
|
configs -= angle_undefine_configs
|
2016-07-18 20:47:12 +03:00
|
|
|
|
2015-01-14 22:31:02 +03:00
|
|
|
configs += [
|
|
|
|
":commit_id_config",
|
2015-06-17 01:03:14 +03:00
|
|
|
":debug_annotations_config",
|
2016-07-18 17:10:29 +03:00
|
|
|
":extra_warnings",
|
2015-01-14 22:31:02 +03:00
|
|
|
":libANGLE_config",
|
|
|
|
":internal_config",
|
|
|
|
]
|
2015-01-13 19:13:56 +03:00
|
|
|
|
2015-01-14 22:31:02 +03:00
|
|
|
if (is_win) {
|
2016-06-02 20:04:10 +03:00
|
|
|
data_deps = [
|
|
|
|
":copy_compiler_dll",
|
|
|
|
]
|
2015-01-14 01:52:17 +03:00
|
|
|
}
|
2015-01-14 22:31:02 +03:00
|
|
|
}
|
2015-01-13 19:13:56 +03:00
|
|
|
|
2016-06-21 18:47:03 +03:00
|
|
|
config("shared_library_public_config") {
|
|
|
|
if (is_mac && !is_component_build) {
|
|
|
|
# Executable targets that depend on the shared libraries below need to have
|
|
|
|
# the rpath setup in non-component build configurations.
|
2016-07-18 20:47:12 +03:00
|
|
|
ldflags = [
|
|
|
|
"-rpath",
|
|
|
|
"@executable_path/",
|
|
|
|
]
|
2016-06-21 18:47:03 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-01-14 22:31:02 +03:00
|
|
|
shared_library("libGLESv2") {
|
|
|
|
sources = rebase_path(gles_gypi.libglesv2_sources, ".", "src")
|
2015-01-13 19:13:56 +03:00
|
|
|
|
2015-01-14 22:31:02 +03:00
|
|
|
if (is_win) {
|
2016-01-04 19:25:00 +03:00
|
|
|
ldflags =
|
|
|
|
[ "/DEF:" + rebase_path("src/libGLESv2/libGLESv2.def", root_build_dir) ]
|
2015-01-14 22:31:02 +03:00
|
|
|
}
|
2015-01-13 19:13:56 +03:00
|
|
|
|
2016-06-21 18:47:03 +03:00
|
|
|
if (is_mac && !is_component_build) {
|
2016-07-18 20:47:12 +03:00
|
|
|
ldflags = [
|
|
|
|
"-install_name",
|
|
|
|
"@rpath/${target_name}.dylib",
|
|
|
|
]
|
2016-06-21 18:47:03 +03:00
|
|
|
public_configs = [ ":shared_library_public_config" ]
|
|
|
|
}
|
|
|
|
|
2016-06-02 20:04:10 +03:00
|
|
|
configs -= angle_undefine_configs
|
2015-01-14 22:31:02 +03:00
|
|
|
configs += [
|
|
|
|
":internal_config",
|
|
|
|
":commit_id_config",
|
2015-06-17 01:03:14 +03:00
|
|
|
":debug_annotations_config",
|
2015-01-14 22:31:02 +03:00
|
|
|
":libANGLE_config",
|
|
|
|
]
|
2015-01-13 19:13:56 +03:00
|
|
|
|
2016-01-04 19:25:00 +03:00
|
|
|
defines = [ "LIBGLESV2_IMPLEMENTATION" ]
|
2015-01-14 22:31:02 +03:00
|
|
|
|
|
|
|
deps = [
|
|
|
|
":includes",
|
|
|
|
":libANGLE",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
shared_library("libEGL") {
|
|
|
|
sources = rebase_path(gles_gypi.libegl_sources, ".", "src")
|
|
|
|
|
|
|
|
if (is_win) {
|
2016-01-04 19:25:00 +03:00
|
|
|
ldflags = [ "/DEF:" + rebase_path("src/libEGL/libEGL.def", root_build_dir) ]
|
2015-01-14 01:52:17 +03:00
|
|
|
}
|
2015-01-14 22:31:02 +03:00
|
|
|
|
2016-06-21 18:47:03 +03:00
|
|
|
if (is_mac && !is_component_build) {
|
2016-07-18 20:47:12 +03:00
|
|
|
ldflags = [
|
|
|
|
"-install_name",
|
|
|
|
"@rpath/${target_name}.dylib",
|
|
|
|
]
|
2016-06-21 18:47:03 +03:00
|
|
|
public_configs = [ ":shared_library_public_config" ]
|
|
|
|
}
|
|
|
|
|
2016-06-02 20:04:10 +03:00
|
|
|
configs -= angle_undefine_configs
|
2015-01-14 22:31:02 +03:00
|
|
|
configs += [
|
|
|
|
":commit_id_config",
|
2015-09-02 17:30:55 +03:00
|
|
|
":debug_annotations_config",
|
2016-07-18 17:10:29 +03:00
|
|
|
":extra_warnings",
|
|
|
|
":internal_config",
|
2015-01-14 22:31:02 +03:00
|
|
|
":libANGLE_config",
|
|
|
|
]
|
|
|
|
|
2016-01-04 19:25:00 +03:00
|
|
|
defines = [ "LIBEGL_IMPLEMENTATION" ]
|
2015-01-14 22:31:02 +03:00
|
|
|
|
|
|
|
deps = [
|
|
|
|
":includes",
|
|
|
|
":libGLESv2",
|
|
|
|
]
|
|
|
|
}
|
2015-09-02 17:30:55 +03:00
|
|
|
|
2016-01-04 19:25:00 +03:00
|
|
|
util_gypi = exec_script("//build/gypi_to_gn.py",
|
|
|
|
[ rebase_path("util/util.gyp") ],
|
|
|
|
"scope",
|
|
|
|
[ "util/util.gyp" ])
|
|
|
|
|
|
|
|
config("angle_util_config") {
|
|
|
|
include_dirs = [ "util" ]
|
2016-06-13 23:39:01 +03:00
|
|
|
if (is_linux && use_x11) {
|
2016-01-07 22:33:48 +03:00
|
|
|
libs = [ "X11" ]
|
|
|
|
}
|
2016-01-04 19:25:00 +03:00
|
|
|
}
|
2015-09-02 17:30:55 +03:00
|
|
|
|
2016-08-13 03:40:14 +03:00
|
|
|
shared_library("angle_util") {
|
2015-09-02 17:30:55 +03:00
|
|
|
sources = rebase_path(util_gypi.util_sources, ".", "util")
|
|
|
|
|
|
|
|
if (is_win) {
|
|
|
|
sources += rebase_path(util_gypi.util_win32_sources, ".", "util")
|
|
|
|
}
|
|
|
|
|
|
|
|
if (is_linux) {
|
|
|
|
sources += rebase_path(util_gypi.util_linux_sources, ".", "util")
|
2016-05-20 00:59:55 +03:00
|
|
|
libs = [
|
|
|
|
"rt",
|
|
|
|
"dl",
|
|
|
|
]
|
2015-09-02 17:30:55 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
if (is_mac) {
|
|
|
|
sources += rebase_path(util_gypi.util_osx_sources, ".", "util")
|
2016-08-13 03:40:14 +03:00
|
|
|
libs = [
|
|
|
|
"AppKit.framework",
|
|
|
|
"QuartzCore.framework",
|
|
|
|
]
|
2015-09-02 17:30:55 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
if (use_x11) {
|
|
|
|
sources += rebase_path(util_gypi.util_x11_sources, ".", "util")
|
|
|
|
}
|
|
|
|
|
2016-06-03 07:18:38 +03:00
|
|
|
if (is_android) {
|
|
|
|
# To prevent linux sources filtering on android
|
|
|
|
set_sources_assignment_filter([])
|
|
|
|
sources += rebase_path(util_gypi.util_linux_sources, ".", "util")
|
|
|
|
sources += rebase_path(util_gypi.util_android_sources, ".", "util")
|
|
|
|
libs = [
|
|
|
|
"android",
|
|
|
|
"log",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2016-06-13 23:39:01 +03:00
|
|
|
if (use_ozone) {
|
|
|
|
sources += rebase_path(util_gypi.util_ozone_sources, ".", "util")
|
|
|
|
}
|
|
|
|
|
2015-09-15 20:12:07 +03:00
|
|
|
defines = [
|
|
|
|
"GL_GLEXT_PROTOTYPES",
|
|
|
|
"EGL_EGLEXT_PROTOTYPES",
|
2016-08-13 03:40:14 +03:00
|
|
|
"LIBANGLE_UTIL_IMPLEMENTATION",
|
2015-09-15 20:12:07 +03:00
|
|
|
]
|
|
|
|
|
2016-07-18 17:10:29 +03:00
|
|
|
configs += [
|
|
|
|
":debug_annotations_config",
|
|
|
|
":extra_warnings",
|
|
|
|
]
|
2015-09-02 17:30:55 +03:00
|
|
|
|
2016-01-04 19:25:00 +03:00
|
|
|
public_configs = [
|
|
|
|
":angle_util_config",
|
|
|
|
":internal_config",
|
2015-09-02 17:30:55 +03:00
|
|
|
]
|
2016-08-13 03:40:14 +03:00
|
|
|
if (is_mac && !is_component_build) {
|
|
|
|
ldflags = [
|
|
|
|
"-install_name",
|
|
|
|
"@rpath/lib${target_name}.dylib",
|
|
|
|
]
|
|
|
|
public_configs += [ ":shared_library_public_config" ]
|
|
|
|
}
|
2015-09-02 17:30:55 +03:00
|
|
|
|
|
|
|
deps = [
|
2016-01-07 22:33:48 +03:00
|
|
|
":angle_common",
|
2015-09-02 17:30:55 +03:00
|
|
|
":libEGL",
|
|
|
|
":libGLESv2",
|
|
|
|
]
|
|
|
|
}
|