Commit 77df676e by Frank Henigman Committed by Commit Bot

Add ozone display gn build.

Pick up ozone source when use_ozone = true. Don't link X11 unless use_x11 = true. BUG=angleproject:1297 CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_chromium_gn_chromeos_rel Change-Id: I94e6242189646c8a18b00436294bccdd4c5a8785 Reviewed-on: https://chromium-review.googlesource.com/352251Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org> Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
parent 027cda63
...@@ -4,9 +4,14 @@ ...@@ -4,9 +4,14 @@
# import the use_x11 variable # import the use_x11 variable
import("//build/config/dcheck_always_on.gni") import("//build/config/dcheck_always_on.gni")
import("//build/config/linux/pkg_config.gni")
import("//build/config/ui.gni") import("//build/config/ui.gni")
import("//third_party/angle/build/angle_common.gni") import("//third_party/angle/build/angle_common.gni")
pkg_config("libdrm") {
packages = [ "libdrm" ]
}
angle_git_is_present = exec_script("src/commit_id.py", angle_git_is_present = exec_script("src/commit_id.py",
[ [
"check", "check",
...@@ -343,6 +348,14 @@ static_library("libANGLE") { ...@@ -343,6 +348,14 @@ static_library("libANGLE") {
"log", "log",
] ]
} }
if (use_ozone) {
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")
}
} }
if (angle_enable_vulkan) { if (angle_enable_vulkan) {
...@@ -443,7 +456,7 @@ util_gypi = exec_script("//build/gypi_to_gn.py", ...@@ -443,7 +456,7 @@ util_gypi = exec_script("//build/gypi_to_gn.py",
config("angle_util_config") { config("angle_util_config") {
include_dirs = [ "util" ] include_dirs = [ "util" ]
if (is_linux) { if (is_linux && use_x11) {
libs = [ "X11" ] libs = [ "X11" ]
} }
} }
...@@ -482,6 +495,10 @@ static_library("angle_util") { ...@@ -482,6 +495,10 @@ static_library("angle_util") {
] ]
} }
if (use_ozone) {
sources += rebase_path(util_gypi.util_ozone_sources, ".", "util")
}
defines = [ defines = [
"GL_GLEXT_PROTOTYPES", "GL_GLEXT_PROTOTYPES",
"EGL_EGLEXT_PROTOTYPES", "EGL_EGLEXT_PROTOTYPES",
......
...@@ -18,15 +18,12 @@ if (is_win) { ...@@ -18,15 +18,12 @@ if (is_win) {
import("//build/config/win/visual_studio_version.gni") import("//build/config/win/visual_studio_version.gni")
} else if (is_linux && use_x11 && !is_chromeos) { } else if (is_linux && use_x11 && !is_chromeos) {
angle_enable_gl = true angle_enable_gl = true
} else if (is_mac) { } else if (is_mac || use_ozone) {
angle_enable_gl = true angle_enable_gl = true
} else if (is_android) { } else if (is_android) {
angle_enable_gl = true angle_enable_gl = true
} }
# TODO(gyp): Probably also want to angle_enable_gl = true if (use_ozone)
# to match gyp.
angle_enable_essl = true angle_enable_essl = true
angle_enable_glsl = true angle_enable_glsl = true
angle_enable_hlsl = false angle_enable_hlsl = false
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment