Skip to content

Commit 7a8af73

Browse files
kjlubickDawn LUCI CQ
authored andcommitted
Make some third_party deps configurable in CMake
This will let Skia sync its own copy and point Dawn at them. Change-Id: I0326c8e2f74867508fa67d3c71c0148891cc8a6c Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/270815 Commit-Queue: Kaylee Lubick <[email protected]> Reviewed-by: David Neto <[email protected]> Auto-Submit: Kaylee Lubick <[email protected]> Reviewed-by: Kai Ninomiya <[email protected]> Commit-Queue: David Neto <[email protected]>
1 parent 6fb5035 commit 7a8af73

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,12 +192,15 @@ set_if_not_defined(DAWN_PROTOBUF_DIR "${DAWN_THIRD_PARTY_DIR}/protobuf" "Directo
192192
set_if_not_defined(DAWN_LPM_DIR "${DAWN_THIRD_PARTY_DIR}/libprotobuf-mutator/src" "Directory in which to find libprotobuf")
193193
set_if_not_defined(DAWN_EMDAWNWEBGPU_DIR "${DAWN_THIRD_PARTY_DIR}/emdawnwebgpu" "Directory in which to find Dawn specific Emscripten bindings")
194194
set_if_not_defined(DAWN_GOOGLETEST_DIR "${DAWN_THIRD_PARTY_DIR}/googletest" "Directory in which to find googletest")
195-
195+
set_if_not_defined(DAWN_EGL_REGISTRY_DIR "${DAWN_THIRD_PARTY_DIR}/khronos/EGL-Registry" "Directory in which to find EGL-Registry")
196+
set_if_not_defined(DAWN_OPENGL_REGISTRY_DIR "${DAWN_THIRD_PARTY_DIR}/khronos/OpenGL-Registry" "Directory in which to find OpenGL-Registry")
196197
set_if_not_defined(DAWN_SPIRV_TOOLS_DIR "${DAWN_THIRD_PARTY_DIR}/spirv-tools/src" "Directory in which to find SPIRV-Tools")
197198
set_if_not_defined(DAWN_SPIRV_HEADERS_DIR "${DAWN_THIRD_PARTY_DIR}/spirv-headers/src" "Directory in which to find SPIRV-Headers")
198199
set_if_not_defined(DAWN_GLSLANG_DIR "${DAWN_THIRD_PARTY_DIR}/glslang/src" "Directory in which to find GLSLang")
199200
set_if_not_defined(DAWN_VULKAN_HEADERS_DIR "${DAWN_THIRD_PARTY_DIR}/vulkan-headers/src" "Directory in which to find Vulkan-Headers")
200201
set_if_not_defined(DAWN_VULKAN_UTILITY_LIBRARIES_DIR "${DAWN_THIRD_PARTY_DIR}/vulkan-utility-libraries/src" "Directory in which to find Vulkan-Utility-Libraries")
202+
set_if_not_defined(DAWN_WEBGPU_HEADERS_DIR "${DAWN_THIRD_PARTY_DIR}/webgpu-headers/src" "Directory in which to find webgpu headers")
203+
201204

202205
# Handling of the type of monolithic library to build, if any.
203206
set(DAWN_BUILD_MONOLITHIC_LIBRARY "STATIC" CACHE STRING "Build monolithic library: SHARED, STATIC, or OFF.")

generator/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ function(DawnJSONGenerator)
185185
${arg_TARGET}
186186
${arg_UNPARSED_ARGUMENTS}
187187
--webgpu-json
188-
"${Dawn_SOURCE_DIR}/third_party/webgpu-headers/src/webgpu.json"
188+
"${DAWN_WEBGPU_HEADERS_DIR}/webgpu.json"
189189
)
190190

191191
if (SOURCES AND NOT arg_OUTPUT_SOURCES)

src/dawn/native/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,7 @@ if (DAWN_ENABLE_OPENGL)
649649
SCRIPT "${Dawn_SOURCE_DIR}/generator/opengl_loader_generator.py"
650650
PRINT_NAME "OpenGL function loader"
651651
EXTRA_PARAMETERS "--gl-xml"
652-
"${Dawn_SOURCE_DIR}/third_party/khronos/OpenGL-Registry/xml/gl.xml"
652+
"${DAWN_OPENGL_REGISTRY_DIR}/xml/gl.xml"
653653
"--supported-extensions"
654654
"${Dawn_SOURCE_DIR}/src/dawn/native/opengl/supported_extensions.json"
655655
OUTPUT_HEADERS DAWN_NATIVE_OPENGL_AUTOGEN_HEADERS

third_party/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,8 @@ endif()
177177
if (DAWN_ENABLE_DESKTOP_GL OR DAWN_ENABLE_OPENGLES)
178178
# Header-only library for khrplatform.h
179179
add_library(dawn_khronos_platform INTERFACE)
180-
target_sources(dawn_khronos_platform INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/khronos/EGL-Registry/api/KHR/khrplatform.h")
181-
target_include_directories(dawn_khronos_platform INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/khronos/EGL-Registry/api")
180+
target_sources(dawn_khronos_platform INTERFACE "${DAWN_EGL_REGISTRY_DIR}/api/KHR/khrplatform.h")
181+
target_include_directories(dawn_khronos_platform INTERFACE "${DAWN_EGL_REGISTRY_DIR}/api")
182182
endif()
183183

184184
if (NOT TARGET Vulkan::Headers AND DAWN_ENABLE_VULKAN)

0 commit comments

Comments
 (0)