This change adds CMake targets that setup and build ANGLE by invoking
gclient and gn. The 'angle-setup' target should run only once (if the
.gclient file does not exist), and the 'angle' target will build if any
source file under angle/src is modfied.
The 'angle' target builds libEGL and libGLESv2 into
${CMAKE_BINARY_DIR}/bin-angle. Furthermore, if building PowerVR examples are
enabled (SWIFTSHADER_BUILD_PVR), the PVR output folder,
${CMAKE_BINARY_DIR}/bin, gets copied to ${CMAKE_BINARY_DIR}/bin-angle
first. Finally, a script named 'export-swangle-env.bat/sh' also gets
copied to ${CMAKE_BINARY_DIR}/bin-angle, which sets environment
variables so that the PowerVR examples will run on "SWANGLE" (that is,
on ANGLE on SwiftShaderVK).
Example on Linux:
cd SwiftShader/build
cmake -DSWIFTSHADER_BUILD_PVR=1 -DSWIFTSHADER_BUILD_ANGLE=1 ..
cmake --build . --target angle
source bin-angle/export-swangle-env.sh
./bin-angle/OpenGLESBumpmap
On Windows, run bin-angle\export-swangle-env.bat, and execute the
examples from the bin-angle directory.
Bug: b/152028822
Change-Id: Idd06fb1b6f14b47740692352d353f3a0c9588a90
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/47109Tested-by:
Antonio Maiorano <amaiorano@google.com>
Kokoro-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
| Name |
Last commit
|
Last update |
|---|---|---|
| .vscode | Loading commit data... | |
| build | Loading commit data... | |
| build_overrides | Loading commit data... | |
| docs | Loading commit data... | |
| extensions | Loading commit data... | |
| include | Loading commit data... | |
| src | Loading commit data... | |
| tests | Loading commit data... | |
| third_party | Loading commit data... | |
| tools/cmake_generate_graphviz | Loading commit data... | |
| .clang-format | Loading commit data... | |
| .dir-locals.el | Loading commit data... | |
| .gitignore | Loading commit data... | |
| .gitmodules | Loading commit data... | |
| AUTHORS.txt | Loading commit data... | |
| Android.bp | Loading commit data... | |
| BUILD.gn | Loading commit data... | |
| CMakeLists.txt | Loading commit data... | |
| CMakeSettings.json | Loading commit data... | |
| CONTRIBUTING.txt | Loading commit data... | |
| CONTRIBUTORS.txt | Loading commit data... | |
| LICENSE.txt | Loading commit data... | |
| OWNERS | Loading commit data... | |
| README.md | Loading commit data... | |
| codereview.settings | Loading commit data... |