Add some CMake build target updates.
This CL adds the `dawn_headers` into the `webgpu_dawn` library in order to find the generated `dawn/webgpu.h` and `dawn/webgpu_cpp.h` header files during the build. An alias is added for `dawncpp` called `webgpu_cpp` so it can be used to link instead of referencing dawn directly Change-Id: I93fa97534e1e6e7aea349e5d7efb08807f6a0d61 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/98580 Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
This commit is contained in:
parent
6d59932482
commit
11e415d0bd
|
@ -112,6 +112,8 @@ common_compile_options(dawncpp)
|
|||
target_sources(dawncpp PRIVATE ${DAWNCPP_GEN_SOURCES})
|
||||
target_link_libraries(dawncpp PUBLIC dawncpp_headers)
|
||||
|
||||
add_library(webgpu_cpp ALIAS dawncpp)
|
||||
|
||||
###############################################################################
|
||||
# libdawn_proc
|
||||
###############################################################################
|
||||
|
|
|
@ -594,6 +594,7 @@ DawnJSONGenerator(
|
|||
add_library(webgpu_dawn ${DAWN_PLACEHOLDER_FILE})
|
||||
common_compile_options(webgpu_dawn)
|
||||
target_link_libraries(webgpu_dawn PRIVATE dawn_native)
|
||||
target_link_libraries(webgpu_dawn PUBLIC dawn_headers)
|
||||
target_compile_definitions(webgpu_dawn PRIVATE "WGPU_IMPLEMENTATION")
|
||||
if(BUILD_SHARED_LIBS)
|
||||
target_compile_definitions(webgpu_dawn PRIVATE "WGPU_SHARED_LIBRARY")
|
||||
|
|
Loading…
Reference in New Issue