mirror of
https://github.com/SFML/CSFML.git
synced 2026-10-24 13:53:36 +02:00
Build SFML dynamically for the windows release packages
This commit is contained in:
1 parent
e153a8a4ce
commit
2537d27991
3 files changed
+12
-17
No files matched your search
@@ -1,10 +1,7 @@
|
||||
name: NuGet Release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- 2.6.x
|
||||
push: {}
|
||||
workflow_dispatch: {}
|
||||
|
||||
concurrency:
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
name: Release Builds
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- 2.6.x
|
||||
tags:
|
||||
- "**"
|
||||
push: {}
|
||||
workflow_dispatch: {}
|
||||
|
||||
concurrency:
|
||||
@@ -51,12 +46,12 @@ jobs:
|
||||
|
||||
- name: Build SFML
|
||||
run: |
|
||||
cmake -S SFML -B SFML-build -A Win32 -G "Visual Studio 17 2022" -DBUILD_SHARED_LIBS=FALSE -DSFML_USE_STATIC_STD_LIBS=TRUE -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/SFML-install -DCMAKE_VERBOSE_MAKEFILE=ON
|
||||
cmake -S SFML -B SFML-build -A Win32 -G "Visual Studio 17 2022" -DBUILD_SHARED_LIBS=TRUE -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/SFML-install -DCMAKE_VERBOSE_MAKEFILE=ON
|
||||
cmake --build SFML-build --config Release --target install
|
||||
|
||||
- name: Build CSFML
|
||||
run: |
|
||||
cmake -S CSFML -B CSFML-build -A Win32 -G "Visual Studio 17 2022" -DBUILD_SHARED_LIBS=TRUE -DSTATIC_STD_LIBS=TRUE -DCSFML_LINK_SFML_STATICALLY=TRUE -DCMAKE_BUILD_TYPE=Release -DSFML_DIR=${{ github.workspace }}/SFML-install/lib/cmake/SFML -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/CSFML-install -DCMAKE_VERBOSE_MAKEFILE=ON
|
||||
cmake -S CSFML -B CSFML-build -A Win32 -G "Visual Studio 17 2022" -DBUILD_SHARED_LIBS=TRUE -DCSFML_LINK_SFML_STATICALLY=FALSE -DCMAKE_BUILD_TYPE=Release -DSFML_DIR=${{ github.workspace }}/SFML-install/lib/cmake/SFML -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/CSFML-install -DCMAKE_VERBOSE_MAKEFILE=ON
|
||||
cmake --build CSFML-build --config Release --target install
|
||||
|
||||
- name: Add MinGW to PATH
|
||||
@@ -93,6 +88,7 @@ jobs:
|
||||
Pop-Location
|
||||
|
||||
New-Item -ItemType "directory" -PATH "install"
|
||||
Move-Item -Path "SFML-install\bin\*" -Destination "install\CSFML"
|
||||
Move-Item -Path "CSFML-install\*" -Destination "install\CSFML"
|
||||
|
||||
- name: Upload Artifact
|
||||
@@ -138,12 +134,12 @@ jobs:
|
||||
|
||||
- name: Build SFML
|
||||
run: |
|
||||
cmake -S SFML -B SFML-build -A x64 -G "Visual Studio 17 2022" -DBUILD_SHARED_LIBS=FALSE -DSFML_USE_STATIC_STD_LIBS=TRUE -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/SFML-install -DCMAKE_VERBOSE_MAKEFILE=ON
|
||||
cmake -S SFML -B SFML-build -A x64 -G "Visual Studio 17 2022" -DBUILD_SHARED_LIBS=TRUE -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/SFML-install -DCMAKE_VERBOSE_MAKEFILE=ON
|
||||
cmake --build SFML-build --config Release --target install
|
||||
|
||||
- name: Build CSFML
|
||||
run: |
|
||||
cmake -S CSFML -B CSFML-build -A x64 -G "Visual Studio 17 2022" -DBUILD_SHARED_LIBS=TRUE -DSTATIC_STD_LIBS=TRUE -DCSFML_LINK_SFML_STATICALLY=TRUE -DCMAKE_BUILD_TYPE=Release -DSFML_DIR=${{ github.workspace }}/SFML-install/lib/cmake/SFML -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/CSFML-install -DCMAKE_VERBOSE_MAKEFILE=ON
|
||||
cmake -S CSFML -B CSFML-build -A x64 -G "Visual Studio 17 2022" -DBUILD_SHARED_LIBS=TRUE -DCSFML_LINK_SFML_STATICALLY=FALSE -DCMAKE_BUILD_TYPE=Release -DSFML_DIR=${{ github.workspace }}/SFML-install/lib/cmake/SFML -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/CSFML-install -DCMAKE_VERBOSE_MAKEFILE=ON
|
||||
cmake --build CSFML-build --config Release --target install
|
||||
|
||||
- name: Add MinGW to PATH
|
||||
@@ -180,6 +176,7 @@ jobs:
|
||||
Pop-Location
|
||||
|
||||
New-Item -ItemType "directory" -PATH "install"
|
||||
Move-Item -Path "SFML-install\bin\*" -Destination "install\CSFML"
|
||||
Move-Item -Path "CSFML-install\*" -Destination "install\CSFML"
|
||||
|
||||
- name: Upload Artifact
|
||||
|
||||
@@ -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" `
|
||||
@@ -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" `
|
||||
@@ -193,6 +193,7 @@ function Copy-Module($module) {
|
||||
Write-Output "Copying CSFML $module"
|
||||
|
||||
New-Item -ItemType Directory $OutDir -ErrorAction Ignore > $null
|
||||
Copy-Item "$SFMLBuiltDir/bin/sfml-$module-2.dll" "$OutDir" -Force > $null
|
||||
Copy-Item "$CSFMLLibDir/csfml-$module-2.dll" "$OutDir/csfml-$module.dll" -Force > $null
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user