Bläddra i källkod

Use cuda-mingw import libs when available

master
Jan Svabenik 3 dagar sedan
förälder
incheckning
0027a5035b
1 ändrade filer med 4 tillägg och 3 borttagningar
  1. +4
    -3
      build-sdrplay.ps1

+ 4
- 3
build-sdrplay.ps1 Visa fil

@@ -24,16 +24,17 @@ if (-not (Test-Path $cudaInc)) {
if (Test-Path $cudaInc) { if (Test-Path $cudaInc) {
$env:CGO_CFLAGS = "$env:CGO_CFLAGS -I$cudaInc" $env:CGO_CFLAGS = "$env:CGO_CFLAGS -I$cudaInc"
} }
if (Test-Path $cudaLib) {
$env:CGO_LDFLAGS = "$env:CGO_LDFLAGS -L$cudaLib -lcufft -lcudart"
}
if (Test-Path $cudaBin) { if (Test-Path $cudaBin) {
$env:PATH = "$cudaBin;" + $env:PATH $env:PATH = "$cudaBin;" + $env:PATH
} }


$cudaMingw = Join-Path $PSScriptRoot 'cuda-mingw' $cudaMingw = Join-Path $PSScriptRoot 'cuda-mingw'
if (Test-Path $cudaMingw) { if (Test-Path $cudaMingw) {
# Use MinGW import libs to avoid MSVC .lib linking issues
$env:CGO_LDFLAGS = "$env:CGO_LDFLAGS -L$cudaMingw" $env:CGO_LDFLAGS = "$env:CGO_LDFLAGS -L$cudaMingw"
} elseif (Test-Path $cudaLib) {
# Fallback to CUDA lib path (requires compatible toolchain)
$env:CGO_LDFLAGS = "$env:CGO_LDFLAGS -L$cudaLib -lcufft -lcudart"
} }


Write-Host "Building with SDRplay + cuFFT support..." -ForegroundColor Cyan Write-Host "Building with SDRplay + cuFFT support..." -ForegroundColor Cyan


Laddar…
Avbryt
Spara