mirror of
https://github.com/guilhermewerner/rust-ffi
synced 2025-06-15 05:14:18 +00:00
39 lines
675 B
PowerShell
39 lines
675 B
PowerShell
#!/usr/bin/env pwsh
|
|
|
|
echo "Installing dependencies..."
|
|
|
|
#cargo install cbindgen
|
|
|
|
echo "Generating bindings..."
|
|
|
|
cbindgen --config ./Config/Bindings.toml --crate Library --output ./Source/Header.h --quiet
|
|
|
|
# Windows
|
|
|
|
if ($IsWindows)
|
|
{
|
|
echo "Generating Visual Studio project..."
|
|
|
|
& "./Vendor/Premake/Windows/premake5.exe" "vs2019"
|
|
}
|
|
|
|
# Mac
|
|
|
|
elseif ($IsMacOS)
|
|
{
|
|
echo "Generating XCode project..."
|
|
|
|
sudo chmod +x ./Vendor/Premake/Mac/premake5
|
|
& "./Vendor/Premake/Mac/premake5" "xcode4"
|
|
}
|
|
|
|
# Linux
|
|
|
|
elseif ($IsLinux)
|
|
{
|
|
echo "Generating GMake project..."
|
|
|
|
sudo chmod +x ./Vendor/Premake/Linux/premake5
|
|
& "./Vendor/Premake/Linux/premake5" "gmake2"
|
|
}
|