static link MoltenVK (#196)

* static link MoltenVK

* static link MoltenVK

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test
This commit is contained in:
Logan McNaughton 2025-01-28 20:56:42 +01:00 committed by GitHub
parent ed8b4e8e02
commit 3e2189463f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 0 deletions

View File

@ -82,12 +82,15 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Homebrew
uses: Homebrew/actions/setup-homebrew@master
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
target: ${{ matrix.target }}
rustflags: ""
- name: Build
run: |
brew install molten-vk
cargo build --release -v --target=${{ matrix.target }}
- name: Upload file
uses: actions/upload-artifact@v4

View File

@ -158,4 +158,12 @@ fn main() {
simd_build.include(".");
simd_build.compile("simd");
}
if os == "macos" {
// Add Homebrew lib path for Apple Silicon Macs
println!("cargo:rustc-link-search=native=/opt/homebrew/lib");
// Add Homebrew lib path for Intel Macs
println!("cargo:rustc-link-search=native=/usr/local/lib");
println!("cargo:rustc-link-lib=static=MoltenVK");
}
}