From 862ab6a449998711818c553114d8264bac6e208c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20D=C3=BCrrenberger?= Date: Mon, 9 Dec 2024 13:17:27 +0100 Subject: [PATCH] Remove extlibs references that are no longer needed --- tools/nuget/build.macos.sh | 35 +++-------------------------------- tools/nuget/build.win.ps1 | 15 +++------------ 2 files changed, 6 insertions(+), 44 deletions(-) diff --git a/tools/nuget/build.macos.sh b/tools/nuget/build.macos.sh index 7bbf369..f6fdcdc 100755 --- a/tools/nuget/build.macos.sh +++ b/tools/nuget/build.macos.sh @@ -146,39 +146,12 @@ cmake -E env \ "$CSFMLDir" cmake --build . --config Release --target install -# ============================ # -# STEP 5: Fix RPATH references # -# ============================ # +# ======================================== # +# STEP 5: Copy result to the NuGet folders # +# ======================================== # SFMLMajorMinor="3.0" SFMLMajorMinorPatch="$SFMLMajorMinor.0" - -# SFML's framework dependencies will always reference @rpath/../Frameworks/ -# Which is not where we place the frameworks and where SFML should look for them -# This this fixes the dependency with install_name_tool -fixrpath() -{ - MODULE="$1" - OLD="$2" - NEW="$3" - - install_name_tool -change $OLD $NEW "$SFMLLibDir/libsfml-$MODULE.dylib" - install_name_tool -change $OLD $NEW "$SFMLLibDir/libsfml-$MODULE.$SFMLMajorMinor.dylib" - install_name_tool -change $OLD $NEW "$SFMLLibDir/libsfml-$MODULE.$SFMLMajorMinorPatch.dylib" -} - -fixrpath audio "@rpath/../Frameworks/vorbisenc.framework/Versions/A/vorbisenc" "@rpath/vorbisenc.framework/Versions/A/vorbisenc" -fixrpath audio "@rpath/../Frameworks/vorbisfile.framework/Versions/A/vorbisfile" "@rpath/vorbisfile.framework/Versions/A/vorbisfile" -fixrpath audio "@rpath/../Frameworks/vorbis.framework/Versions/A/vorbis" "@rpath/vorbis.framework/Versions/A/vorbis" -fixrpath audio "@rpath/../Frameworks/ogg.framework/Versions/A/ogg" "@rpath/ogg.framework/Versions/A/ogg" -fixrpath audio "@rpath/../Frameworks/FLAC.framework/Versions/A/FLAC" "@rpath/FLAC.framework/Versions/A/FLAC" - -fixrpath graphics "@rpath/../Frameworks/freetype.framework/Versions/A/freetype" "@rpath/freetype.framework/Versions/A/freetype" - -# ======================================== # -# STEP 6: Copy result to the NuGet folders # -# ======================================== # - CSFMLMajorMinor="3.0" CSFMLMajorMinorPatch="$CSFMLMajorMinor.0" @@ -208,8 +181,6 @@ copymodule graphics copymodule system copymodule window -cp -R "$SFMLLibDir/lib/"*.framework "$OutDir" - popd # Pop CSFML popd # Pop $RID popd # Pop Build diff --git a/tools/nuget/build.win.ps1 b/tools/nuget/build.win.ps1 index 3d4174d..cf338eb 100644 --- a/tools/nuget/build.win.ps1 +++ b/tools/nuget/build.win.ps1 @@ -83,17 +83,9 @@ Push-Location "SFML" $SFMLDir = (Get-Item .).FullName -switch ($RID) { - 'win-x86' { - $SFMLExtLibs = (Get-Item ./extlibs/libs-msvc-universal/x86).FullName - } - 'win-x64' { - $SFMLExtLibs = (Get-Item ./extlibs/libs-msvc-universal/x64).FullName - } - Default { - Write-Error "Unknown RID '$RID'" - exit - } +IF ($RID -ne 'win-x86' -and $RID -ne 'win-x64') { + Write-Error "Unknown RID '$RID'" + exit } Pop-Location # Pop SFML @@ -142,7 +134,6 @@ $CSFMLLibDir = (Get-Item lib).FullName; # The directory where the final CSFML dl cmake ` "-DSFML_ROOT=$SFMLInstallDir" ` '-DCSFML_LINK_SFML_STATICALLY=OFF' ` - "-DCMAKE_LIBRARY_PATH=$SFMLExtLibs" ` ` "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=$CSFMLLibDir" ` "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=$CSFMLLibDir" `