Use CMAKE_CURRENT_SOURCE_DIR for third_party/khronos.

The third_party/khronos folder is directly commited into the Dawn repo.
This means it isn't really move-able to a different third_party folder
but it still uses the `DAWN_THIRD_PARTY_DIR` variable. This makes it
difficult to change where the rest of the third party code lives.

This CL changes the `third_party/khronos` references to use
`CMAKE_CURRENT_SOURCE_DIR` instead of `DAWN_THIRD_PARTY_DIR`.

Change-Id: I791bf3dc25e8149da44bbf686b5cdcfd5f4a392e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/30620
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
dan sinclair 2020-10-20 17:43:00 +00:00 committed by Commit Bot service account
parent e8022eaf59
commit ecd46ab123
1 changed files with 9 additions and 9 deletions

View File

@ -80,17 +80,17 @@ endif()
# Header-only library for khrplatform.h
add_library(dawn_khronos_platform INTERFACE)
target_sources(dawn_khronos_platform INTERFACE "${DAWN_THIRD_PARTY_DIR}/khronos/KHR/khrplatform.h")
target_include_directories(dawn_khronos_platform INTERFACE "${DAWN_THIRD_PARTY_DIR}/khronos")
target_sources(dawn_khronos_platform INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/khronos/KHR/khrplatform.h")
target_include_directories(dawn_khronos_platform INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/khronos")
# Header-only library for Vulkan headers
add_library(dawn_vulkan_headers INTERFACE)
target_sources(dawn_vulkan_headers INTERFACE
"${DAWN_THIRD_PARTY_DIR}/khronos/vulkan/vk_icd.h"
"${DAWN_THIRD_PARTY_DIR}/khronos/vulkan/vk_layer.h"
"${DAWN_THIRD_PARTY_DIR}/khronos/vulkan/vk_platform.h"
"${DAWN_THIRD_PARTY_DIR}/khronos/vulkan/vk_sdk_platform.h"
"${DAWN_THIRD_PARTY_DIR}/khronos/vulkan/vulkan.h"
"${DAWN_THIRD_PARTY_DIR}/khronos/vulkan/vulkan_core.h"
"${CMAKE_CURRENT_SOURCE_DIR}/khronos/vulkan/vk_icd.h"
"${CMAKE_CURRENT_SOURCE_DIR}/khronos/vulkan/vk_layer.h"
"${CMAKE_CURRENT_SOURCE_DIR}/khronos/vulkan/vk_platform.h"
"${CMAKE_CURRENT_SOURCE_DIR}/khronos/vulkan/vk_sdk_platform.h"
"${CMAKE_CURRENT_SOURCE_DIR}/khronos/vulkan/vulkan.h"
"${CMAKE_CURRENT_SOURCE_DIR}/khronos/vulkan/vulkan_core.h"
)
target_include_directories(dawn_vulkan_headers INTERFACE "${DAWN_THIRD_PARTY_DIR}/khronos")
target_include_directories(dawn_vulkan_headers INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/khronos")