mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-07-08 14:15:58 +00:00
Add the correct rpath to use Swiftshader / Vulkan on macOS
Previously the @executable_path rpath was only added when doing component builds and non-component builds failed to find Vulkan and Swiftshader on macOS. Bug: None Change-Id: I0277566e4bf181703dff26bb1bf3e57858864009 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37442 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Austin Eng <enga@chromium.org> Auto-Submit: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Stephen White <senorblanco@chromium.org> Reviewed-by: Austin Eng <enga@chromium.org>
This commit is contained in:
parent
f600666866
commit
4b30f93762
@ -77,6 +77,17 @@ config("dawn_native_weak_framework") {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Config that adds the @executable_path rpath if needed so that Swiftshader or the Vulkan loader are found.
|
||||||
|
config("dawn_native_vulkan_rpath") {
|
||||||
|
if (is_mac && dawn_enable_vulkan &&
|
||||||
|
(use_swiftshader || enable_vulkan_loader)) {
|
||||||
|
ldflags = [
|
||||||
|
"-rpath",
|
||||||
|
"@executable_path/",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
dawn_json_generator("dawn_native_utils_gen") {
|
dawn_json_generator("dawn_native_utils_gen") {
|
||||||
target = "dawn_native_utils"
|
target = "dawn_native_utils"
|
||||||
outputs = [
|
outputs = [
|
||||||
@ -633,7 +644,10 @@ dawn_component("dawn_native") {
|
|||||||
]
|
]
|
||||||
sources = [ "DawnNative.cpp" ]
|
sources = [ "DawnNative.cpp" ]
|
||||||
configs = [ ":dawn_native_internal" ]
|
configs = [ ":dawn_native_internal" ]
|
||||||
public_configs = [ ":dawn_native_weak_framework" ]
|
public_configs = [
|
||||||
|
":dawn_native_weak_framework",
|
||||||
|
":dawn_native_vulkan_rpath",
|
||||||
|
]
|
||||||
|
|
||||||
if (dawn_enable_d3d12) {
|
if (dawn_enable_d3d12) {
|
||||||
sources += [ "d3d12/D3D12Backend.cpp" ]
|
sources += [ "d3d12/D3D12Backend.cpp" ]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user