CMake: make submodule initialization work for add_subdirectory(SwiftShader)
Pass "-C ${SWIFTSHADER_DIR}" to the git submodule command so that it
executes from the SwiftShader directory, and not CMAKE_CURRENT_SOURCE,
which will be an outer directory. Also, make sure to always check if one
target from the submodule already exists to allow parent projects to add
their own version.
Also:
* Refactor submodule init code into function(InitSubmodule)
* Only download libbacktrace if REACTOR_EMIT_DEBUG_INFO is enabled
* Add downloads of json and cppdap if SWIFTSHADER_BUILD_CPPDAP is enabled
Bug: b/145758253
Change-Id: I3bd3f3fcb7f7190f052d2e6f144468bffa0c79da
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43951
Kokoro-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by:
Ben Clayton <bclayton@google.com>
Tested-by:
Antonio Maiorano <amaiorano@google.com>
Showing
Please
register
or
sign in
to comment