Skip to content

Commit

Permalink
Build SFML dynamically for the NuGet package
Browse files Browse the repository at this point in the history
  • Loading branch information
eXpl0it3r committed Jun 5, 2024
1 parent e153a8a commit 7e83fbf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/nuget.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
name: NuGet Release

on:
push:
branches:
- master
- 2.6.x
push: {}
workflow_dispatch: {}

concurrency:
Expand Down
7 changes: 4 additions & 3 deletions tools/nuget/build.win.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ New-Push SFML
$SFMLBuiltDir = Get-Location # The directory where SFML was built to. Used later to direct cmake when building CSFML

cmake `
'-DBUILD_SHARED_LIBS=0' `
'-DBUILD_SHARED_LIBS=1' `
'-DCMAKE_BUILD_TYPE=Release' `
'-DCMAKE_SYSTEM_VERSION=8.1' `
'-DSFML_USE_STATIC_STD_LIBS=1' `
'-DSFML_USE_STATIC_STD_LIBS=0' `
'-DSFML_BUILD_NETWORK=0' `
"-G$Generator" `
"-A$Architecture" `
Expand All @@ -142,7 +142,7 @@ $CSFMLLibDir = (Get-Item lib).FullName; # The directory where the final CSFML dl

cmake `
"-DSFML_DIR=$SFMLBuiltDir" `
'-DCSFML_LINK_SFML_STATICALLY=1' `
'-DCSFML_LINK_SFML_STATICALLY=0' `
"-DCMAKE_LIBRARY_PATH=$SFMLExtLibs" `
`
"-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=$CSFMLLibDir" `
Expand Down Expand Up @@ -193,6 +193,7 @@ function Copy-Module($module) {
Write-Output "Copying CSFML $module"

New-Item -ItemType Directory $OutDir -ErrorAction Ignore > $null
Copy-Item "$SFMLLibDir/sfml-$module-2.dll" "$OutDir" -Force > $null
Copy-Item "$CSFMLLibDir/csfml-$module-2.dll" "$OutDir/csfml-$module.dll" -Force > $null
}

Expand Down

0 comments on commit 7e83fbf

Please sign in to comment.