Commit 80ab03c5 by Jamie Madill Committed by Commit Bot

Add angle_white_box_tests for libANGLE render tests.

angle_end2end_tests included tests that used both the entry points from our shared libraries as well as calling libANGLE classes like gl::Context directly. Split these into a new test executable. This also removes the libANGLE code from all the end2end tests. It's necessary to add static versions of libEGL and libGLESv2 so that we call safely call methods in libANGLE an the entry points from the same target. BUG=angleproject:1660 Change-Id: I6d82021b9300231ddb5fee435e5d77728f8f1292 Reviewed-on: https://chromium-review.googlesource.com/419175Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent 62300122
...@@ -47,6 +47,12 @@ config("internal_config") { ...@@ -47,6 +47,12 @@ config("internal_config") {
"include", "include",
"src", "src",
] ]
# Prevent the GL headers from redeclaring ANGLE entry points.
defines = [
"GL_GLEXT_PROTOTYPES",
"EGL_EGLEXT_PROTOTYPES",
]
} }
config("extra_warnings") { config("extra_warnings") {
...@@ -274,18 +280,9 @@ config("libANGLE_config") { ...@@ -274,18 +280,9 @@ config("libANGLE_config") {
if (angle_enable_null) { if (angle_enable_null) {
defines += [ "ANGLE_ENABLE_NULL" ] defines += [ "ANGLE_ENABLE_NULL" ]
} }
defines += [ defines += [ "LIBANGLE_IMPLEMENTATION" ]
"GL_GLEXT_PROTOTYPES",
"EGL_EGLEXT_PROTOTYPES",
"LIBANGLE_IMPLEMENTATION",
]
if (is_win) { if (is_win) {
defines += [ "GL_APICALL=" ]
} else {
defines += [ "GL_APICALL=__attribute__((visibility(\"default\")))" ]
}
if (is_win) {
cflags += [ "/wd4530" ] # C++ exception handler used, but unwind semantics are not enabled. cflags += [ "/wd4530" ] # C++ exception handler used, but unwind semantics are not enabled.
} }
} }
...@@ -388,10 +385,11 @@ static_library("libANGLE") { ...@@ -388,10 +385,11 @@ static_library("libANGLE") {
":commit_id_config", ":commit_id_config",
":debug_annotations_config", ":debug_annotations_config",
":extra_warnings", ":extra_warnings",
":libANGLE_config",
":internal_config", ":internal_config",
] ]
public_configs = [ ":libANGLE_config" ]
if (is_win) { if (is_win) {
data_deps = [ data_deps = [
":copy_compiler_dll", ":copy_compiler_dll",
...@@ -410,6 +408,15 @@ config("shared_library_public_config") { ...@@ -410,6 +408,15 @@ config("shared_library_public_config") {
} }
} }
# This config controls export definitions on ANGLE API calls.
config("angle_static") {
defines = [
"ANGLE_EXPORT=",
"EGLAPI=",
"GL_APICALL=",
]
}
shared_library("libGLESv2") { shared_library("libGLESv2") {
sources = rebase_path(gles_gypi.libglesv2_sources, ".", "src") sources = rebase_path(gles_gypi.libglesv2_sources, ".", "src")
...@@ -428,13 +435,35 @@ shared_library("libGLESv2") { ...@@ -428,13 +435,35 @@ shared_library("libGLESv2") {
configs -= angle_undefine_configs configs -= angle_undefine_configs
configs += [ configs += [
":internal_config",
":commit_id_config", ":commit_id_config",
":debug_annotations_config", ":debug_annotations_config",
":libANGLE_config", ":internal_config",
] ]
defines = [ "LIBGLESV2_IMPLEMENTATION" ] defines = [ "LIBGLESV2_IMPLEMENTATION" ]
if (is_win) {
defines += [ "GL_APICALL=" ]
} else {
defines += [ "GL_APICALL=__attribute__((visibility(\"default\")))" ]
}
deps = [
":includes",
":libANGLE",
]
}
static_library("libGLESv2_static") {
sources = rebase_path(gles_gypi.libglesv2_sources, ".", "src")
configs -= angle_undefine_configs
configs += [
":commit_id_config",
":debug_annotations_config",
":internal_config",
]
public_configs = [ ":angle_static" ]
deps = [ deps = [
":includes", ":includes",
...@@ -445,6 +474,21 @@ shared_library("libGLESv2") { ...@@ -445,6 +474,21 @@ shared_library("libGLESv2") {
shared_library("libEGL") { shared_library("libEGL") {
sources = rebase_path(gles_gypi.libegl_sources, ".", "src") sources = rebase_path(gles_gypi.libegl_sources, ".", "src")
configs -= angle_undefine_configs
configs += [
":commit_id_config",
":debug_annotations_config",
":extra_warnings",
":internal_config",
]
defines = [ "LIBEGL_IMPLEMENTATION" ]
if (is_win) {
defines += [ "EGLAPI=" ]
} else {
defines += [ "EGLAPI=__attribute__((visibility(\"default\")))" ]
}
if (is_win) { if (is_win) {
ldflags = [ "/DEF:" + rebase_path("src/libEGL/libEGL.def", root_build_dir) ] ldflags = [ "/DEF:" + rebase_path("src/libEGL/libEGL.def", root_build_dir) ]
} }
...@@ -457,6 +501,15 @@ shared_library("libEGL") { ...@@ -457,6 +501,15 @@ shared_library("libEGL") {
public_configs = [ ":shared_library_public_config" ] public_configs = [ ":shared_library_public_config" ]
} }
deps = [
":includes",
":libGLESv2",
]
}
static_library("libEGL_static") {
sources = rebase_path(gles_gypi.libegl_sources, ".", "src")
configs -= angle_undefine_configs configs -= angle_undefine_configs
configs += [ configs += [
":commit_id_config", ":commit_id_config",
...@@ -465,16 +518,11 @@ shared_library("libEGL") { ...@@ -465,16 +518,11 @@ shared_library("libEGL") {
":internal_config", ":internal_config",
] ]
defines = [ "LIBEGL_IMPLEMENTATION" ] public_configs = [ ":angle_static" ]
if (is_win) {
defines += [ "EGLAPI=" ]
} else {
defines += [ "EGLAPI=__attribute__((visibility(\"default\")))" ]
}
deps = [ deps = [
":includes", ":includes",
":libGLESv2", ":libGLESv2_static",
] ]
} }
...@@ -490,74 +538,89 @@ config("angle_util_config") { ...@@ -490,74 +538,89 @@ config("angle_util_config") {
} }
} }
shared_library("angle_util") { foreach(is_shared_library,
sources = rebase_path(util_gypi.util_sources, ".", "util") [
true,
if (is_win) { false,
sources += rebase_path(util_gypi.util_win32_sources, ".", "util") ]) {
if (is_shared_library) {
library_type = "shared_library"
library_name = "angle_util"
dep_suffix = ""
} else {
library_type = "static_library"
library_name = "angle_util_static"
dep_suffix = "_static"
} }
if (is_linux) { target(library_type, library_name) {
sources += rebase_path(util_gypi.util_linux_sources, ".", "util") sources = rebase_path(util_gypi.util_sources, ".", "util")
libs = [
"rt",
"dl",
]
}
if (is_mac) { if (is_win) {
sources += rebase_path(util_gypi.util_osx_sources, ".", "util") sources += rebase_path(util_gypi.util_win32_sources, ".", "util")
libs = [ }
"AppKit.framework",
"QuartzCore.framework",
]
}
if (use_x11) { if (is_linux) {
sources += rebase_path(util_gypi.util_x11_sources, ".", "util") sources += rebase_path(util_gypi.util_linux_sources, ".", "util")
} libs = [
"rt",
"dl",
]
}
if (is_android) { if (is_mac) {
# To prevent linux sources filtering on android sources += rebase_path(util_gypi.util_osx_sources, ".", "util")
set_sources_assignment_filter([]) libs = [
sources += rebase_path(util_gypi.util_linux_sources, ".", "util") "AppKit.framework",
sources += rebase_path(util_gypi.util_android_sources, ".", "util") "QuartzCore.framework",
libs = [ ]
"android", }
"log",
]
}
if (use_ozone) { if (use_x11) {
sources += rebase_path(util_gypi.util_ozone_sources, ".", "util") sources += rebase_path(util_gypi.util_x11_sources, ".", "util")
} }
defines = [ if (is_android) {
"GL_GLEXT_PROTOTYPES", # To prevent linux sources filtering on android
"EGL_EGLEXT_PROTOTYPES", set_sources_assignment_filter([])
"LIBANGLE_UTIL_IMPLEMENTATION", sources += rebase_path(util_gypi.util_linux_sources, ".", "util")
] sources += rebase_path(util_gypi.util_android_sources, ".", "util")
libs = [
"android",
"log",
]
}
configs += [ if (use_ozone) {
":debug_annotations_config", sources += rebase_path(util_gypi.util_ozone_sources, ".", "util")
":extra_warnings", }
]
public_configs = [ configs += [
":angle_util_config", ":debug_annotations_config",
":internal_config", ":extra_warnings",
]
if (is_mac && !is_component_build) {
ldflags = [
"-install_name",
"@rpath/lib${target_name}.dylib",
] ]
public_configs += [ ":shared_library_public_config" ]
}
deps = [ public_configs = [
":angle_common", ":angle_util_config",
":libEGL", ":internal_config",
":libGLESv2", ]
]
deps = [
":angle_common",
":libEGL${dep_suffix}",
":libGLESv2${dep_suffix}",
]
if (is_shared_library) {
defines = [ "LIBANGLE_UTIL_IMPLEMENTATION" ]
if (is_mac && !is_component_build) {
ldflags = [
"-install_name",
"@rpath/lib${target_name}.dylib",
]
public_configs += [ ":shared_library_public_config" ]
}
}
}
} }
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#ifndef LIBGLESV2_EXPORT_H_ #ifndef LIBGLESV2_EXPORT_H_
#define LIBGLESV2_EXPORT_H_ #define LIBGLESV2_EXPORT_H_
#if !defined(ANGLE_EXPORT)
#if defined(_WIN32) #if defined(_WIN32)
#if defined(LIBGLESV2_IMPLEMENTATION) || defined(LIBANGLE_IMPLEMENTATION) || \ #if defined(LIBGLESV2_IMPLEMENTATION) || defined(LIBANGLE_IMPLEMENTATION) || \
defined(LIBANGLE_UTIL_IMPLEMENTATION) defined(LIBANGLE_UTIL_IMPLEMENTATION)
...@@ -26,5 +27,6 @@ ...@@ -26,5 +27,6 @@
#else #else
# define ANGLE_EXPORT # define ANGLE_EXPORT
#endif #endif
#endif // !defined(ANGLE_EXPORT)
#endif // LIBGLESV2_EXPORT_H_ #endif // LIBGLESV2_EXPORT_H_
...@@ -53,5 +53,38 @@ ...@@ -53,5 +53,38 @@
}], }],
], ],
}, },
{
'target_name': 'libEGL_static',
'type': 'static_library',
'dependencies':
[
'libGLESv2_static',
],
'includes':
[
'../gyp/common_defines.gypi',
],
'include_dirs':
[
'.',
'../include',
],
'sources':
[
'<@(libegl_sources)',
],
'defines':
[
'EGLAPI=',
],
'direct_dependent_settings':
{
'defines':
[
'EGLAPI=',
],
},
},
], ],
} }
...@@ -711,6 +711,61 @@ ...@@ -711,6 +711,61 @@
'targets': 'targets':
[ [
{ {
# This target includes the right ANGLE defines for common/platform.h for D3D11.
# It also links against the right libs. This is useful for the tests, which
# have special D3D11 code for Debug runtime error message handling.
'target_name': 'libANGLE_d3d11_config',
'type': 'none',
'direct_dependent_settings':
{
'conditions':
[
['angle_enable_d3d11==1',
{
'defines':
[
'ANGLE_ENABLE_D3D11',
],
}],
],
},
'conditions':
[
['angle_enable_d3d11==1',
{
'link_settings':
{
'msvs_settings':
{
'VCLinkerTool':
{
'conditions':
[
['angle_build_winrt==0',
{
'AdditionalDependencies':
[
'dxguid.lib',
],
}],
['angle_build_winrt==1',
{
'AdditionalDependencies':
[
'dxguid.lib',
'd3d11.lib',
'd3dcompiler.lib',
],
}],
],
}
},
},
}],
],
},
{
'target_name': 'libANGLE', 'target_name': 'libANGLE',
'type': 'static_library', 'type': 'static_library',
'dependencies': 'dependencies':
...@@ -719,6 +774,7 @@ ...@@ -719,6 +774,7 @@
'commit_id', 'commit_id',
'angle_common', 'angle_common',
'angle_image_util', 'angle_image_util',
'libANGLE_d3d11_config',
], ],
'includes': [ '../gyp/common_defines.gypi', ], 'includes': [ '../gyp/common_defines.gypi', ],
'include_dirs': 'include_dirs':
...@@ -739,6 +795,7 @@ ...@@ -739,6 +795,7 @@
'export_dependent_settings': 'export_dependent_settings':
[ [
'angle_common', 'angle_common',
'libANGLE_d3d11_config',
], ],
'direct_dependent_settings': 'direct_dependent_settings':
{ {
...@@ -780,13 +837,6 @@ ...@@ -780,13 +837,6 @@
'ANGLE_ENABLE_D3D9', 'ANGLE_ENABLE_D3D9',
], ],
}], }],
['angle_enable_d3d11==1',
{
'defines':
[
'ANGLE_ENABLE_D3D11',
],
}],
['angle_enable_gl==1', ['angle_enable_gl==1',
{ {
'defines': 'defines':
...@@ -859,38 +909,6 @@ ...@@ -859,38 +909,6 @@
[ [
'<@(libangle_d3d11_sources)', '<@(libangle_d3d11_sources)',
], ],
'defines':
[
'ANGLE_ENABLE_D3D11',
],
'link_settings':
{
'msvs_settings':
{
'VCLinkerTool':
{
'conditions':
[
['angle_build_winrt==0',
{
'AdditionalDependencies':
[
'dxguid.lib',
],
}],
['angle_build_winrt==1',
{
'AdditionalDependencies':
[
'dxguid.lib',
'd3d11.lib',
'd3dcompiler.lib',
],
}],
],
}
},
},
'conditions': 'conditions':
[ [
['angle_build_winrt==1', ['angle_build_winrt==1',
...@@ -1078,5 +1096,27 @@ ...@@ -1078,5 +1096,27 @@
}], }],
], ],
}, },
{
'target_name': 'libGLESv2_static',
'type': 'static_library',
'dependencies': [ 'libANGLE', 'angle_common' ],
'export_dependent_settings':
[
'libANGLE',
],
'includes': [ '../gyp/common_defines.gypi', ],
'sources':
[
'<@(libglesv2_sources)',
],
'conditions':
[
['angle_build_winrt==1',
{
'msvs_requires_importlibrary' : 'true',
}],
],
},
], ],
} }
...@@ -92,14 +92,65 @@ if (is_win || is_linux || is_mac || is_android) { ...@@ -92,14 +92,65 @@ if (is_win || is_linux || is_mac || is_android) {
"//base/test:test_support", "//base/test:test_support",
"//testing/gmock", "//testing/gmock",
"//testing/gtest", "//testing/gtest",
"//third_party/angle:angle_image_util",
"//third_party/angle:angle_util", "//third_party/angle:angle_util",
"//third_party/angle:libANGLE",
"//third_party/angle:libEGL", "//third_party/angle:libEGL",
"//third_party/angle:libGLESv2", "//third_party/angle:libGLESv2",
"//third_party/angle:preprocessor", "//third_party/angle:preprocessor",
"//third_party/angle:translator", "//third_party/angle:translator",
] ]
} }
white_box_gypi = exec_script("//build/gypi_to_gn.py",
[
rebase_path("angle_white_box_tests.gypi"),
"--replace=<(angle_path)=.",
],
"scope",
[ "angle_white_box_tests.gypi" ])
test("angle_white_box_tests") {
include_dirs = [
"testing/gtest/include",
"../../src/tests",
"../../util",
]
if (is_android) {
use_native_activity = true
}
sources =
rebase_path(white_box_gypi.angle_white_box_tests_sources, ".", "../..")
if (is_win) {
sources += rebase_path(white_box_gypi.angle_white_box_tests_win_sources,
".",
"../..")
}
# Share the same main file as end2end_tests.
# TODO(jmadill): Probably should rename this if we're sharing.
sources += [ "//gpu/angle_end2end_tests_main.cc" ]
configs += [
"//third_party/angle:internal_config",
"//third_party/angle:libANGLE_config",
]
deps = [
"//base",
"//base/test:test_support",
"//testing/gmock",
"//testing/gtest",
"//third_party/angle:angle_util_static",
"//third_party/angle:libANGLE",
"//third_party/angle:libEGL_static",
"//third_party/angle:libGLESv2_static",
"//third_party/angle:preprocessor",
"//third_party/angle:translator",
]
}
} }
if (is_win || is_linux) { if (is_win || is_linux) {
......
...@@ -98,10 +98,6 @@ ...@@ -98,10 +98,6 @@
'angle_end2end_tests_win_sources': 'angle_end2end_tests_win_sources':
[ [
'<(angle_path)/src/tests/gl_tests/D3DImageFormatConversionTest.cpp', '<(angle_path)/src/tests/gl_tests/D3DImageFormatConversionTest.cpp',
'<(angle_path)/src/tests/gl_tests/D3DTextureTest.cpp',
'<(angle_path)/src/tests/gl_tests/D3D11EmulatedIndexedBufferTest.cpp',
'<(angle_path)/src/tests/gl_tests/D3D11FormatTablesTest.cpp',
'<(angle_path)/src/tests/gl_tests/D3D11InputLayoutCacheTest.cpp',
'<(angle_path)/src/tests/egl_tests/EGLDeviceTest.cpp', '<(angle_path)/src/tests/egl_tests/EGLDeviceTest.cpp',
'<(angle_path)/src/tests/egl_tests/EGLPresentPathD3D11Test.cpp', '<(angle_path)/src/tests/egl_tests/EGLPresentPathD3D11Test.cpp',
'<(angle_path)/src/tests/egl_tests/EGLStreamTest.cpp', '<(angle_path)/src/tests/egl_tests/EGLStreamTest.cpp',
...@@ -116,7 +112,9 @@ ...@@ -116,7 +112,9 @@
}, },
'dependencies': 'dependencies':
[ [
'<(angle_path)/src/angle.gyp:libANGLE', '<(angle_path)/src/angle.gyp:angle_image_util',
# We use the D3D11 config for enabling Debug runtime error logging.
'<(angle_path)/src/angle.gyp:libANGLE_d3d11_config',
'<(angle_path)/src/angle.gyp:libEGL', '<(angle_path)/src/angle.gyp:libEGL',
'<(angle_path)/src/angle.gyp:libGLESv2', '<(angle_path)/src/angle.gyp:libGLESv2',
'<(angle_path)/src/tests/tests.gyp:angle_test_support', '<(angle_path)/src/tests/tests.gyp:angle_test_support',
......
# Copyright (c) 2014 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# This .gypi describes all of the sources and dependencies to build a
# unified "angle_white_box_tests" target, which contains all of the
# tests that exercise the ANGLE implementation. It requires a parent
# target to include this gypi in an executable target containing a
# gtest harness in a main.cpp.
{
# Everything below this is duplicated in the GN build.
# If you change anything also change angle/src/tests/BUILD.gn
'variables':
{
'angle_white_box_tests_sources':
[
'<(angle_path)/src/tests/test_utils/angle_test_configs.cpp',
'<(angle_path)/src/tests/test_utils/angle_test_configs.h',
'<(angle_path)/src/tests/test_utils/angle_test_instantiate.cpp',
'<(angle_path)/src/tests/test_utils/angle_test_instantiate.h',
'<(angle_path)/src/tests/test_utils/ANGLETest.cpp',
'<(angle_path)/src/tests/test_utils/ANGLETest.h',
'<(angle_path)/src/tests/test_utils/gl_raii.h',
],
'angle_white_box_tests_win_sources':
[
'<(angle_path)/src/tests/gl_tests/D3D11EmulatedIndexedBufferTest.cpp',
'<(angle_path)/src/tests/gl_tests/D3D11FormatTablesTest.cpp',
'<(angle_path)/src/tests/gl_tests/D3D11InputLayoutCacheTest.cpp',
'<(angle_path)/src/tests/gl_tests/D3DTextureTest.cpp',
],
},
'dependencies':
[
'<(angle_path)/src/angle.gyp:libGLESv2_static',
'<(angle_path)/src/angle.gyp:libEGL_static',
'<(angle_path)/src/tests/tests.gyp:angle_test_support',
'<(angle_path)/util/util.gyp:angle_util_static',
],
'include_dirs':
[
'<(angle_path)/include',
'<(angle_path)/src/tests'
],
'sources':
[
'<@(angle_white_box_tests_sources)',
],
'conditions':
[
['OS=="win"',
{
'sources':
[
'<@(angle_white_box_tests_win_sources)',
],
}],
]
}
//
// Copyright (c) 2013 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
#include "gtest/gtest.h"
#include "test_utils/ANGLETest.h"
int main(int argc, char **argv)
{
testing::InitGoogleTest(&argc, argv);
testing::AddGlobalTestEnvironment(new ANGLETestEnvironment());
int rt = RUN_ALL_TESTS();
return rt;
}
...@@ -491,6 +491,12 @@ void ANGLETest::checkD3D11SDKLayersMessages() ...@@ -491,6 +491,12 @@ void ANGLETest::checkD3D11SDKLayersMessages()
const char *extensionString = const char *extensionString =
static_cast<const char *>(eglQueryString(mEGLWindow->getDisplay(), EGL_EXTENSIONS)); static_cast<const char *>(eglQueryString(mEGLWindow->getDisplay(), EGL_EXTENSIONS));
if (!extensionString)
{
std::cout << "Error getting extension string from EGL Window." << std::endl;
return;
}
if (!strstr(extensionString, "EGL_EXT_device_query")) if (!strstr(extensionString, "EGL_EXT_device_query"))
{ {
return; return;
......
...@@ -179,6 +179,19 @@ ...@@ -179,6 +179,19 @@
], ],
}, },
{ {
'target_name': 'angle_white_box_tests',
'type': 'executable',
'includes':
[
'../../gyp/common_defines.gypi',
'angle_white_box_tests.gypi',
],
'sources':
[
'angle_white_box_tests_main.cpp',
],
},
{
'target_name': 'angle_perftests', 'target_name': 'angle_perftests',
'type': 'executable', 'type': 'executable',
'includes': 'includes':
......
...@@ -93,11 +93,110 @@ ...@@ -93,11 +93,110 @@
'targets': 'targets':
[ [
{ {
'target_name': 'angle_util_config',
'type': 'none',
'direct_dependent_settings':
{
'include_dirs':
[
'<(angle_path)/include',
'<(angle_path)/util',
],
'sources':
[
'<@(util_sources)',
],
'defines':
[
'GL_GLEXT_PROTOTYPES',
'EGL_EGLEXT_PROTOTYPES',
'LIBANGLE_UTIL_IMPLEMENTATION',
],
'conditions':
[
['OS=="win" and angle_build_winrt==0',
{
'sources':
[
'<@(util_win32_sources)',
],
}],
['OS=="win" and angle_build_winrt==1',
{
'sources':
[
'<@(util_winrt_sources)',
],
}],
['OS=="linux"',
{
'sources':
[
'<@(util_linux_sources)',
],
'link_settings':
{
'libraries':
[
'-ldl',
],
},
}],
['use_x11==1',
{
'sources':
[
'<@(util_x11_sources)',
],
'link_settings':
{
'ldflags':
[
'<!@(<(pkg-config) --libs-only-L --libs-only-other x11 xi)',
],
'libraries':
[
'<!@(<(pkg-config) --libs-only-l x11 xi)',
],
},
}],
['use_ozone==1',
{
'sources':
[
'<@(util_ozone_sources)',
],
}],
['OS=="mac"',
{
'sources':
[
'<@(util_osx_sources)',
],
'xcode_settings':
{
'DYLIB_INSTALL_NAME_BASE': '@rpath',
},
'link_settings':
{
'libraries':
[
'$(SDKROOT)/System/Library/Frameworks/AppKit.framework',
'$(SDKROOT)/System/Library/Frameworks/QuartzCore.framework',
],
},
}],
],
},
},
{
'target_name': 'angle_util', 'target_name': 'angle_util',
'type': 'shared_library', 'type': 'shared_library',
'includes': [ '../gyp/common_defines.gypi', ], 'includes': [ '../gyp/common_defines.gypi', ],
'dependencies': 'dependencies':
[ [
'angle_util_config',
'<(angle_path)/src/angle.gyp:angle_common', '<(angle_path)/src/angle.gyp:angle_common',
'<(angle_path)/src/angle.gyp:libEGL', '<(angle_path)/src/angle.gyp:libEGL',
'<(angle_path)/src/angle.gyp:libGLESv2', '<(angle_path)/src/angle.gyp:libGLESv2',
...@@ -106,20 +205,35 @@ ...@@ -106,20 +205,35 @@
[ [
'<(angle_path)/src/angle.gyp:angle_common', '<(angle_path)/src/angle.gyp:angle_common',
], ],
'include_dirs': 'direct_dependent_settings':
[ {
'<(angle_path)/include', 'include_dirs':
'<(angle_path)/util', [
], '<(angle_path)/include',
'sources': '<(angle_path)/util',
],
'defines':
[
'GL_GLEXT_PROTOTYPES',
'EGL_EGLEXT_PROTOTYPES',
],
},
},
{
'target_name': 'angle_util_static',
'type': 'static_library',
'includes': [ '../gyp/common_defines.gypi', ],
'dependencies':
[ [
'<@(util_sources)', 'angle_util_config',
'<(angle_path)/src/angle.gyp:angle_common',
'<(angle_path)/src/angle.gyp:libEGL_static',
'<(angle_path)/src/angle.gyp:libGLESv2_static',
], ],
'defines': 'export_dependent_settings':
[ [
'GL_GLEXT_PROTOTYPES', '<(angle_path)/src/angle.gyp:angle_common',
'EGL_EGLEXT_PROTOTYPES',
'LIBANGLE_UTIL_IMPLEMENTATION',
], ],
'direct_dependent_settings': 'direct_dependent_settings':
{ {
...@@ -134,81 +248,6 @@ ...@@ -134,81 +248,6 @@
'EGL_EGLEXT_PROTOTYPES', 'EGL_EGLEXT_PROTOTYPES',
], ],
}, },
'conditions':
[
['OS=="win" and angle_build_winrt==0',
{
'sources':
[
'<@(util_win32_sources)',
],
}],
['OS=="win" and angle_build_winrt==1',
{
'sources':
[
'<@(util_winrt_sources)',
],
}],
['OS=="linux"',
{
'sources':
[
'<@(util_linux_sources)',
],
'link_settings':
{
'libraries':
[
'-ldl',
],
},
}],
['use_x11==1',
{
'sources':
[
'<@(util_x11_sources)',
],
'link_settings':
{
'ldflags':
[
'<!@(<(pkg-config) --libs-only-L --libs-only-other x11 xi)',
],
'libraries':
[
'<!@(<(pkg-config) --libs-only-l x11 xi)',
],
},
}],
['use_ozone==1',
{
'sources':
[
'<@(util_ozone_sources)',
],
}],
['OS=="mac"',
{
'sources':
[
'<@(util_osx_sources)',
],
'xcode_settings':
{
'DYLIB_INSTALL_NAME_BASE': '@rpath',
},
'link_settings':
{
'libraries':
[
'$(SDKROOT)/System/Library/Frameworks/AppKit.framework',
'$(SDKROOT)/System/Library/Frameworks/QuartzCore.framework',
],
},
}],
],
}, },
], ],
} }
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