Skip to content

Commit

Permalink
Fix NuGet build for master
Browse files Browse the repository at this point in the history
  • Loading branch information
eXpl0it3r committed Sep 8, 2024
1 parent 3912b33 commit 9d8947f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 22 deletions.
12 changes: 6 additions & 6 deletions tools/nuget/build.linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,12 @@ SFMLLibDir="$(realpath lib)"

cmake -E env LDFLAGS="-z origin" \
cmake \
'-DBUILD_SHARED_LIBS=1' \
'-DBUILD_SHARED_LIBS=ON' \
'-DCMAKE_BUILD_TYPE=Release' \
"-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=$SFMLLibDir" \
'-DCMAKE_BUILD_WITH_INSTALL_RPATH=1' \
'-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON' \
'-DCMAKE_INSTALL_RPATH=$ORIGIN' \
'-DSFML_BUILD_NETWORK=0' \
'-DSFML_BUILD_NETWORK=OFF' \
"$SFMLDir"

cmake --build . --config Release
Expand All @@ -114,12 +114,12 @@ CSFMLLibDir="$(realpath lib)" # The directory that contains the final CSFML libr
cmake -E env LDFLAGS="-z origin" \
cmake \
"-DSFML_ROOT=$SFMLBuiltDir" \
'-DBUILD_SHARED_LIBS=1' \
'-DBUILD_SHARED_LIBS=ON' \
'-DCMAKE_BUILD_TYPE=Release' \
"-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=$CSFMLLibDir" \
'-DCMAKE_BUILD_WITH_INSTALL_RPATH=1' \
'-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON' \
'-DCMAKE_INSTALL_RPATH=$ORIGIN' \
'-DCSFML_BUILD_NETWORK=0' \
'-DCSFML_BUILD_NETWORK=OFF' \
"$CSFMLDir"
cmake --build . --config Release

Expand Down
2 changes: 1 addition & 1 deletion tools/nuget/build.macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ CSFMLLibDir="$(realpath lib)" # The directory that contains the final CSFML libr

cmake -E env \
cmake -G "Unix Makefiles" \
-D "SFML_ROOT=$SFMLBuiltDir" \
-D "SFML_ROOT=$SFMLLibDir" \
-D 'BUILD_SHARED_LIBS=ON' \
-D 'CMAKE_BUILD_TYPE=Release' \
-D "CMAKE_OSX_ARCHITECTURES=$ARCHITECTURE" \
Expand Down
26 changes: 11 additions & 15 deletions tools/nuget/build.win.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,9 @@ $SFMLDir = (Get-Item .).FullName
switch ($RID) {
'win-x86' {
$SFMLExtLibs = (Get-Item ./extlibs/libs-msvc-universal/x86).FullName
$SFMLAudioExtras = (Get-Item ./extlibs/bin/x86).FullName
}
'win-x64' {
$SFMLExtLibs = (Get-Item ./extlibs/libs-msvc-universal/x64).FullName
$SFMLAudioExtras = (Get-Item ./extlibs/bin/x64).FullName
}
Default {
Write-Error "Unknown RID '$RID'"
Expand All @@ -108,24 +106,25 @@ Remove-Item -Recurse -Force -ErrorAction Ignore "$RID"
New-Push "$RID"



Write-Output "Building SFML"
New-Push SFML

$SFMLBuiltDir = Get-Location # The directory where SFML was built to. Used later to direct cmake when building CSFML
$SFMLInstallDir = $SFMLBuiltDir + '/install'

cmake `
'-DBUILD_SHARED_LIBS=0' `
'-DBUILD_SHARED_LIBS=OFF' `
'-DCMAKE_BUILD_TYPE=Release' `
'-DCMAKE_SYSTEM_VERSION=8.1' `
'-DSFML_USE_STATIC_STD_LIBS=1' `
'-DSFML_BUILD_NETWORK=0' `
'-DSFML_USE_STATIC_STD_LIBS=ON' `
'-DSFML_BUILD_NETWORK=OFF' `
"-DCMAKE_INSTALL_PREFIX=$SFMLInstallDir" `
"-G$Generator" `
"-A$Architecture" `
$SFMLDir
Ensure-Success

cmake --build . --config Release -- '-verbosity:minimal'
cmake --build . --config Release --target install -- '-verbosity:minimal'
Ensure-Success

Pop-Location # Pop SFML
Expand All @@ -141,8 +140,8 @@ New-Item -ItemType Directory lib > $null
$CSFMLLibDir = (Get-Item lib).FullName; # The directory where the final CSFML dlls are located

cmake `
"-DSFML_ROOT=$SFMLBuiltDir" `
'-DCSFML_LINK_SFML_STATICALLY=1' `
"-DSFML_ROOT=$SFMLInstallDir" `
'-DCSFML_LINK_SFML_STATICALLY=ON' `
"-DCMAKE_LIBRARY_PATH=$SFMLExtLibs" `
`
"-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=$CSFMLLibDir" `
Expand All @@ -155,11 +154,11 @@ cmake `
"-DCMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE=$CSFMLLibDir" `
`
'-DCMAKE_SYSTEM_VERSION=8.1' `
'-DSTATIC_STD_LIBS=1' `
'-DSTATIC_STD_LIBS=ON' `
`
"-DBUILD_SHARED_LIBS=1" `
"-DBUILD_SHARED_LIBS=ON" `
'-DCMAKE_BUILD_TYPE=Release' `
'-DCSFML_BUILD_NETWORK=0' `
'-DCSFML_BUILD_NETWORK=OFF' `
`
"-G$generator" `
"-A$Architecture" `
Expand Down Expand Up @@ -201,9 +200,6 @@ Copy-Module 'graphics'
Copy-Module 'system'
Copy-Module 'window'

Write-Output "Copying Audio module extra files"
Copy-Item "$SFMLAudioExtras/*" "$OutDir"

Pop-Location # Pop CSFML
Pop-Location # Pop $RID
Pop-Location # Pop Build

0 comments on commit 9d8947f

Please sign in to comment.