Skip to content

Commit

Permalink
deps.windows: Add uthash to Windows deps
Browse files Browse the repository at this point in the history
  • Loading branch information
tytan652 committed Jan 19, 2024
1 parent 3c84fe3 commit fc36a1b
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions deps.windows/60-uthash.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
param(
[string] $Name = 'uthash',
[string] $Version = '2.3.0',
[string] $Uri = 'https://github.com/troydhanson/uthash.git',
[string] $Hash = "e493aa90a2833b4655927598f169c31cfcdf7861"
)

function Setup {
Setup-Dependency -Uri $Uri -Hash $Hash -DestinationPath $Path
}

function Install {
Log-Information "Install (${Target})"
Set-Location "$Path"

New-Item -Path "$($ConfigData.OutputPath)/include" -ItemType Directory -Force *> $null

$Items = @(
@{
Path = @("src/utarray.h", "src/uthash.h", "src/utlist.h", "src/utringbuffer.h", "src/utstack.h", "src/utstring.h")
Destination = "$($ConfigData.OutputPath)/include"
ErrorAction = 'SilentlyContinue'
}
)

$Items | ForEach-Object {
$Item = $_
Log-Output ('{0} => {1}' -f ($Item.Path -join ", "), $Item.Destination)
Copy-Item @Item
}
}

0 comments on commit fc36a1b

Please sign in to comment.