Skip to content

Commit

Permalink
Build shared libraries on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
eXpl0it3r committed Jan 22, 2025
1 parent 06dd3bc commit 2ca3a85
Showing 1 changed file with 18 additions and 20 deletions.
38 changes: 18 additions & 20 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,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=ON -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_ROOT=${{ github.workspace }}/SFML-install -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=ON -DCSFML_LINK_SFML_STATICALLY=OFF -DCMAKE_BUILD_TYPE=Release -DSFML_ROOT=${{ github.workspace }}/SFML-install -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/CSFML-install -DCMAKE_VERBOSE_MAKEFILE=ON
cmake --build CSFML-build --config Release --target install
- name: Add MinGW to PATH
Expand All @@ -76,23 +76,23 @@ jobs:
Remove-Item -Path "csfml-graphics-3.def"
& gendef.exe "..\..\bin\csfml-window-3.dll"
& dlltool.exe -d "csfml-window-3.def" -D "..\..\bin\bin\csfml-window-3.dll" -l "libcsfml-window.a"
& dlltool.exe -d "csfml-window-3.def" -D "..\..\bin\csfml-window-3.dll" -l "libcsfml-window.a"
Remove-Item -Path "csfml-window-3.def"
& gendef.exe "..\..\bin\csfml-audio-3.dll"
& dlltool.exe -d "csfml-audio-3.def" -D "..\..\bin\bin\csfml-audio-3.dll" -l "libcsfml-audio.a"
& dlltool.exe -d "csfml-audio-3.def" -D "..\..\bin\csfml-audio-3.dll" -l "libcsfml-audio.a"
Remove-Item -Path "csfml-audio-3.def"
& gendef.exe "..\..\bin\csfml-network-3.dll"
& dlltool.exe -d "csfml-network-3.def" -D "..\..\bin\bin\csfml-network-3.dll" -l "libcsfml-network.a"
& dlltool.exe -d "csfml-network-3.def" -D "..\..\bin\csfml-network-3.dll" -l "libcsfml-network.a"
Remove-Item -Path "csfml-network-3.def"
& gendef.exe "..\..\bin\csfml-system-3.dll"
& dlltool.exe -d "csfml-system-3.def" -D "..\..\bin\bin\csfml-system-3.dll" -l "libcsfml-system.a"
& dlltool.exe -d "csfml-system-3.def" -D "..\..\bin\csfml-system-3.dll" -l "libcsfml-system.a"
Remove-Item -Path "csfml-system-3.def"
Pop-Location
New-Item -ItemType "directory" -PATH "install"
New-Item -ItemType "directory" -PATH "install\CSFML"
Move-Item -Path "CSFML-install\*" -Destination "install\CSFML"
- name: Upload Artifact
Expand Down Expand Up @@ -138,12 +138,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=ON -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_ROOT=${{ github.workspace }}/SFML-install -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=ON -DCSFML_LINK_SFML_STATICALLY=OFF -DCMAKE_BUILD_TYPE=Release -DSFML_ROOT=${{ github.workspace }}/SFML-install -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/CSFML-install -DCMAKE_VERBOSE_MAKEFILE=ON
cmake --build CSFML-build --config Release --target install
- name: Add MinGW to PATH
Expand All @@ -163,23 +163,23 @@ jobs:
Remove-Item -Path "csfml-graphics-3.def"
& gendef.exe "..\..\bin\csfml-window-3.dll"
& dlltool.exe -d "csfml-window-3.def" -D "..\..\bin\bin\csfml-window-3.dll" -l "libcsfml-window.a"
& dlltool.exe -d "csfml-window-3.def" -D "..\..\bin\csfml-window-3.dll" -l "libcsfml-window.a"
Remove-Item -Path "csfml-window-3.def"
& gendef.exe "..\..\bin\csfml-audio-3.dll"
& dlltool.exe -d "csfml-audio-3.def" -D "..\..\bin\bin\csfml-audio-3.dll" -l "libcsfml-audio.a"
& dlltool.exe -d "csfml-audio-3.def" -D "..\..\bin\csfml-audio-3.dll" -l "libcsfml-audio.a"
Remove-Item -Path "csfml-audio-3.def"
& gendef.exe "..\..\bin\csfml-network-3.dll"
& dlltool.exe -d "csfml-network-3.def" -D "..\..\bin\bin\csfml-network-3.dll" -l "libcsfml-network.a"
& dlltool.exe -d "csfml-network-3.def" -D "..\..\bin\csfml-network-3.dll" -l "libcsfml-network.a"
Remove-Item -Path "csfml-network-3.def"
& gendef.exe "..\..\bin\csfml-system-3.dll"
& dlltool.exe -d "csfml-system-3.def" -D "..\..\bin\bin\csfml-system-3.dll" -l "libcsfml-system.a"
& dlltool.exe -d "csfml-system-3.def" -D "..\..\bin\csfml-system-3.dll" -l "libcsfml-system.a"
Remove-Item -Path "csfml-system-3.def"
Pop-Location
New-Item -ItemType "directory" -PATH "install"
New-Item -ItemType "directory" -PATH "install\CSFML"
Move-Item -Path "CSFML-install\*" -Destination "install\CSFML"
- name: Upload Artifact
Expand Down Expand Up @@ -212,7 +212,7 @@ jobs:
-DCMAKE_CXX_COMPILER="/usr/bin/clang++" \
-DCMAKE_C_FLAGS="-stdlib=libc++" \
-DCMAKE_CXX_FLAGS="-stdlib=libc++" \
-DBUILD_SHARED_LIBS=TRUE \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/SFML-install \
-DCMAKE_OSX_ARCHITECTURES=x86_64 \
Expand All @@ -228,8 +228,7 @@ jobs:
-DCMAKE_CXX_COMPILER="/usr/bin/clang++" \
-DCMAKE_C_FLAGS="-stdlib=libc++" \
-DCMAKE_CXX_FLAGS="-stdlib=libc++" \
-DBUILD_SHARED_LIBS=TRUE \
-DCSFML_LINK_SFML_STATICALLY=FALSE \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/CSFML-install \
-DCMAKE_OSX_ARCHITECTURES=x86_64 \
Expand Down Expand Up @@ -275,7 +274,7 @@ jobs:
-DCMAKE_CXX_COMPILER="/usr/bin/clang++" \
-DCMAKE_C_FLAGS="-stdlib=libc++" \
-DCMAKE_CXX_FLAGS="-stdlib=libc++" \
-DBUILD_SHARED_LIBS=TRUE \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/SFML-install \
-DCMAKE_OSX_ARCHITECTURES=arm64 \
Expand All @@ -291,8 +290,7 @@ jobs:
-DCMAKE_CXX_COMPILER="/usr/bin/clang++" \
-DCMAKE_C_FLAGS="-stdlib=libc++" \
-DCMAKE_CXX_FLAGS="-stdlib=libc++" \
-DBUILD_SHARED_LIBS=TRUE \
-DCSFML_LINK_SFML_STATICALLY=FALSE \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/CSFML-install \
-DCMAKE_OSX_ARCHITECTURES=arm64 \
Expand Down

0 comments on commit 2ca3a85

Please sign in to comment.