Add CMake script to setup and build ANGLE
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>
Showing
third_party/angle/CMakeLists.txt
0 → 100644
Please
register
or
sign in
to comment