Fix Dawn Native Android build
Fixes 2 CMake issues: 1. GLFW subdirectory was added regardless of DAWN_SUPPORTS_GLFW_FOR_WINDOWING. 2. Android uses the AHardwareBuffer implementation of memory service. But in the CMake MemoryServiceOpaqueFD.cpp was added instead of MemoryServiceAHardwareBuffer.cpp . Bug: dawn:286 Change-Id: I6d81976a5c12717b3e565c4d9f8d5ae54f4e0446 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/128260 Reviewed-by: Kai Ninomiya <kainino@chromium.org> Commit-Queue: Kai Ninomiya <kainino@chromium.org> Reviewed-by: Dan Sinclair <dsinclair@chromium.org> Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
This commit is contained in:
parent
bd696e91d2
commit
ce2cdb4b4d
|
@ -625,7 +625,13 @@ if (DAWN_ENABLE_VULKAN)
|
|||
target_link_libraries(dawn_native PUBLIC Vulkan-Headers)
|
||||
target_include_directories(dawn_native PRIVATE ${DAWN_VULKAN_TOOLS_DIR})
|
||||
|
||||
if (UNIX AND NOT APPLE)
|
||||
if (ANDROID)
|
||||
target_sources(dawn_native PRIVATE
|
||||
"vulkan/external_memory/MemoryServiceAHardwareBuffer.cpp"
|
||||
"vulkan/external_semaphore/ServiceImplementationFD.cpp"
|
||||
"vulkan/external_semaphore/ServiceImplementationFD.h"
|
||||
)
|
||||
elseif (UNIX AND NOT APPLE)
|
||||
target_sources(dawn_native PRIVATE
|
||||
"vulkan/external_memory/MemoryServiceImplementationDmaBuf.cpp"
|
||||
"vulkan/external_memory/MemoryServiceImplementationDmaBuf.h"
|
||||
|
|
|
@ -53,7 +53,7 @@ if(NOT TARGET glslang AND ${TINT_BUILD_GLSL_WRITER} AND ${TINT_BUILD_SAMPLES})
|
|||
add_subdirectory("${DAWN_THIRD_PARTY_DIR}/vulkan-deps/glslang/src" "${CMAKE_CURRENT_BINARY_DIR}/glslang" EXCLUDE_FROM_ALL)
|
||||
endif()
|
||||
|
||||
if (NOT TARGET glfw)
|
||||
if (NOT TARGET glfw AND DAWN_SUPPORTS_GLFW_FOR_WINDOWING)
|
||||
set(GLFW_BUILD_DOCS OFF CACHE BOOL "" FORCE)
|
||||
set(GLFW_BUILD_TESTS OFF CACHE BOOL "" FORCE)
|
||||
set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
|
||||
|
|
Loading…
Reference in New Issue