From 92d6e53e6def5b995dc67a3a15a7021bd0e19be8 Mon Sep 17 00:00:00 2001 From: Kai Ninomiya Date: Tue, 21 Sep 2021 01:07:35 +0000 Subject: [PATCH] Fix CMake build failures after recent changes - https://dawn-review.googlesource.com/c/dawn/+/62580 Don't add_library for targets that just generate files. - https://dawn-review.googlesource.com/c/dawn/+/64420 Add missing file. Build tested locally, on macOS (only). Bug: dawn:1080, dawn:809 Change-Id: Ia07d040dd5d3f57aa422765270c961ea6e79e3cd Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64702 Commit-Queue: Kai Ninomiya Commit-Queue: Austin Eng Auto-Submit: Kai Ninomiya Reviewed-by: Austin Eng --- src/dawn/CMakeLists.txt | 12 ++++-------- src/dawn_native/CMakeLists.txt | 2 ++ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/dawn/CMakeLists.txt b/src/dawn/CMakeLists.txt index 389b6b0973..7d6a4f6764 100644 --- a/src/dawn/CMakeLists.txt +++ b/src/dawn/CMakeLists.txt @@ -97,10 +97,8 @@ DawnJSONGenerator( PRINT_NAME "WebGPU headers" RESULT_VARIABLE "WEBGPU_HEADERS_GEN_SOURCES" ) - -add_library(webgpu_headers STATIC ${DAWN_DUMMY_FILE}) -target_sources(webgpu_headers PRIVATE - ${WEBGPU_HEADERS_GEN_SOURCES} +add_custom_target(webgpu_headers_gen + DEPENDS ${WEBGPU_HEADERS_GEN_SOURCES} ) DawnJSONGenerator( @@ -108,8 +106,6 @@ DawnJSONGenerator( PRINT_NAME "Emscripten WebGPU bits" RESULT_VARIABLE "EMSCRIPTEN_BITS_GEN_SOURCES" ) - -add_library(emscripten_bits STATIC ${DAWN_DUMMY_FILE}) -target_sources(emscripten_bits PRIVATE - ${EMSCRIPTEN_BITS_GEN_SOURCES} +add_custom_target(emscripten_bits_gen + DEPENDS ${EMSCRIPTEN_BITS_GEN_SOURCES} ) diff --git a/src/dawn_native/CMakeLists.txt b/src/dawn_native/CMakeLists.txt index c2fd965583..fb93f898fb 100644 --- a/src/dawn_native/CMakeLists.txt +++ b/src/dawn_native/CMakeLists.txt @@ -50,6 +50,8 @@ target_sources(dawn_native PRIVATE "BuddyMemoryAllocator.h" "Buffer.cpp" "Buffer.h" + "BufferLocation.cpp" + "BufferLocation.h" "CachedObject.cpp" "CachedObject.h" "CallbackTaskManager.cpp"