[cmake] Add support for CMAKE_SYSTEM_NAME == "Fuchsia"
This patch modifies the CMakeLists.txt file and a few sources
in order to build the SwiftShader Vulkan ICD for Fuchsia with
CMake.
Note that building EGL/GLES_CM/GLESv2 and tests is not supported,
and should be explicitly disabled when configuring the build,
e.g.:
mkdir build-fuchsia && build-fuchsia
cmake .. \
-DCMAKE_TOOLCHAIN_FILE=.../FuchsiaSdkToolchain.cmake \
-DCMAKE_BUILD_TYPE=Release \
-DSWIFTSHADER_BUILD_TESTS=0 \
-DSWIFTSHADER_BUILD_EGL=0 \
-DSWIFTSHADER_BUILD_GLES_CM=0 \
-DSWIFTSHADER_BUILD_GLESv2=0 \
<other-cmake-options>
make # or ninja
NOTE: This should not affect the build for other platforms!
This will make it easier to conditionally add Fuchsia-specific
sources to the build (see discussion on b/144687651 for details).
The BUILD.gn file will still be maintained in parallel for
Fuchsia-specific changes.
NOTE: As of now, the Fuchsia SDK doesn't provide a way for
third-party code to access the framebuffer directly.
Instead, client code should rely on Vulkan presentation
surfaces or higher-level APIs provided by the compositor
that are still in flux / unstable. Hence this will appear
in a future CL.
Bug: b/143122483
Bug: b/144687651
Change-Id: Ica3b98f5a8eb1370287e2bb4ff22ef938aaa4b49
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/38488Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
Kokoro-Result: kokoro <noreply+kokoro@google.com>
Tested-by:
David Turner <digit@google.com>
Showing
Please
register
or
sign in
to comment