From 13935af42b804eaf842b83e0c4adaaa684c4b9c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20D=C3=BCrrenberger?= Date: Sat, 3 Oct 2026 12:12:07 +0200 Subject: [PATCH] Update to SFML 3.1.0 - Require CMake 3.28 to match SFML - Install HarfBuzz, MbedTLS and libssh2 for Linux CI builds - Bump CSFML and NuGet package version to 3.1.0 --- .github/workflows/ci.yml | 13 ++++++------- .github/workflows/release.yml | 2 +- CMakeLists.txt | 6 +++--- include/CSFML/Config.h | 2 +- readme.md | 2 +- tools/BuildMacOS.sh | 4 ++-- tools/nuget/CSFML/CSFML.csproj | 2 +- tools/nuget/build.linux.sh | 8 ++++---- tools/nuget/build.macos.sh | 8 ++++---- tools/nuget/build.win.ps1 | 2 +- 10 files changed, 24 insertions(+), 25 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 70e4b81..03ffc97 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,7 @@ concurrency: cancel-in-progress: true env: - SFML_VERSION: 3.0.2 + SFML_VERSION: 3.1.0 defaults: run: @@ -26,8 +26,7 @@ jobs: platform: - { name: Windows VS2026 x86, os: windows-2025-vs2026, flags: -AWin32 } - { name: Windows VS2026 x64, os: windows-2025-vs2026, flags: -Ax64 } - # ClangCL is disabled until we build against SFML 3.1, the FLAC version bundled with SFML 3.0 fails to compile with VS2026's ClangCL - # - { name: Windows ClangCL, os: windows-2025-vs2026, flags: -T ClangCL } + - { name: Windows ClangCL, os: windows-2025-vs2026, flags: -T ClangCL } - { name: Windows Clang, os: windows-2025-vs2026, flags: -GNinja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ } - { name: Linux GCC, os: ubuntu-24.04, flags: -GNinja } - { name: Linux Clang, os: ubuntu-24.04, flags: -GNinja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ } @@ -43,12 +42,12 @@ jobs: - name: Get CMake and Ninja uses: lukka/get-cmake@latest with: - cmakeVersion: ${{ runner.os == 'Windows' && '4.2' || '3.22' }} # Visual Studio 2026 generator requires CMake 4.2 or later + cmakeVersion: ${{ runner.os == 'Windows' && '4.2' || '3.28' }} # Visual Studio 2026 generator requires CMake 4.2 or later ninjaVersion: latest - name: Install Linux Dependencies if: runner.os == 'Linux' - run: sudo apt-get update && sudo apt-get install libxrandr-dev libxcursor-dev libxi-dev libudev-dev libflac-dev libvorbis-dev libgl1-mesa-dev libegl1-mesa-dev libfreetype-dev + run: sudo apt-get update && sudo apt-get install libxrandr-dev libxcursor-dev libxi-dev libudev-dev libflac-dev libvorbis-dev libgl1-mesa-dev libegl1-mesa-dev libfreetype-dev libharfbuzz-dev libmbedtls-dev libssh2-1-dev - name: Checkout SFML uses: actions/checkout@v7 @@ -128,7 +127,7 @@ jobs: - name: Get CMake and Ninja uses: lukka/get-cmake@latest with: - cmakeVersion: ${{ runner.os == 'Windows' && '4.2' || '3.22' }} # Visual Studio 2026 generator requires CMake 4.2 or later + cmakeVersion: ${{ runner.os == 'Windows' && '4.2' || '3.28' }} # Visual Studio 2026 generator requires CMake 4.2 or later ninjaVersion: latest - name: Install Dependencies @@ -171,7 +170,7 @@ jobs: - name: Get CMake and Ninja uses: lukka/get-cmake@latest with: - cmakeVersion: ${{ runner.os == 'Windows' && '4.2' || '3.22' }} # Visual Studio 2026 generator requires CMake 4.2 or later + cmakeVersion: ${{ runner.os == 'Windows' && '4.2' || '3.28' }} # Visual Studio 2026 generator requires CMake 4.2 or later ninjaVersion: latest - name: Install Doxygen diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 46cb864..0c9f99c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,7 +16,7 @@ concurrency: cancel-in-progress: true env: - SFML_VERSION: 3.0.2 + SFML_VERSION: 3.1.0 defaults: run: diff --git a/CMakeLists.txt b/CMakeLists.txt index baba8f5..f24030b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.22) +cmake_minimum_required(VERSION 3.28) # define a macro that helps defining an option macro(csfml_set_option var default type docstring) @@ -13,7 +13,7 @@ endmacro() csfml_set_option(CMAKE_BUILD_TYPE Release STRING "Choose the type of build (Debug or Release)") # project name -project(CSFML VERSION 3.0.0) +project(CSFML VERSION 3.1.0) # we use the paths from the cmake GNUInstallDirs module as defaults # you can override these if you like @@ -66,7 +66,7 @@ endif() if(CSFML_BUILD_NETWORK) list(PREPEND SFML_MODULES "Network") endif() -find_package(SFML 3.0 COMPONENTS ${SFML_MODULES} REQUIRED) +find_package(SFML 3.1 COMPONENTS ${SFML_MODULES} REQUIRED) # add the subdirectories add_subdirectory(src/CSFML) diff --git a/include/CSFML/Config.h b/include/CSFML/Config.h index 12b49ec..5d99b00 100644 --- a/include/CSFML/Config.h +++ b/include/CSFML/Config.h @@ -36,7 +36,7 @@ // Define the CSFML version //////////////////////////////////////////////////////////// #define CSFML_VERSION_MAJOR 3 -#define CSFML_VERSION_MINOR 0 +#define CSFML_VERSION_MINOR 1 #define CSFML_VERSION_PATCH 0 diff --git a/readme.md b/readme.md index 4280ce4..ffe0653 100644 --- a/readme.md +++ b/readme.md @@ -38,7 +38,7 @@ Here's how to get started. 1. Install SFML. This may be done in a variety of ways including using a system package manager or building and installing SFML from source. -The major version of SFML must match the major version of CSFML. +The major version of SFML must match the major version of CSFML and the minor version of SFML must be the same or newer than the one of CSFML. 2. Configure CSFML. If you are building CSFML for the purpose of contributing, we recommend using the `dev` CMake preset. This will enable a number of useful settings related to developing the library. diff --git a/tools/BuildMacOS.sh b/tools/BuildMacOS.sh index ab8291b..b6eaccc 100644 --- a/tools/BuildMacOS.sh +++ b/tools/BuildMacOS.sh @@ -1,7 +1,7 @@ #!/bin/sh -VERSION="3.0.2" -VERSION_C="3.0.0" +VERSION="3.1.0" +VERSION_C="3.1.0" # BUILD_CSFML=FALSE BUILD_CSFML=TRUE BUILD_SFML=FALSE diff --git a/tools/nuget/CSFML/CSFML.csproj b/tools/nuget/CSFML/CSFML.csproj index 6b2d69f..b115a13 100644 --- a/tools/nuget/CSFML/CSFML.csproj +++ b/tools/nuget/CSFML/CSFML.csproj @@ -4,7 +4,7 @@ netstandard2.0 true - 3.0.0 + 3.1.0 Laurent Gomila sfml csfml Copyright © Laurent Gomila diff --git a/tools/nuget/build.linux.sh b/tools/nuget/build.linux.sh index c2db891..6090f10 100755 --- a/tools/nuget/build.linux.sh +++ b/tools/nuget/build.linux.sh @@ -58,7 +58,7 @@ if [[ -n "$CXX_COMPILER" ]]; then echo "Using custom compilers: CXX=$CXX_COMPILER, CC=$C_COMPILER" fi -SFMLBranch="3.0.2" # The branch or tag of the SFML repository to be cloned +SFMLBranch="3.1.0" # The branch or tag of the SFML repository to be cloned CSFMLDir="$(realpath ../../)" # The directory of the source code of CSFML OutDir="./CSFML/runtimes/$RID/native" # The base directory of all CSFML modules, used to copy the final libraries @@ -145,8 +145,8 @@ cmake --build . --config Release # STEP 5: Copy result to the NuGet folders # # ======================================== # -SFMLMajorMinor="3.0" -CSFMLMajorMinor="3.0" +SFMLMajorMinor="3.1" +CSFMLMajorMinor="3.1" # Copies one SFML and CSFML module into the NuGet package # The module name must be passed to this function as an argument, in lowercase @@ -161,7 +161,7 @@ copymodule() # SFML.Net only searches for the name with common pre- and suffixes # As such we need to ship e.g. libcsfml-graphics.so # But the CSFML libs will look for the major.minor version - # As such we also need to ship e.g. libcsfml-graphics.so.3.0 + # As such we also need to ship e.g. libcsfml-graphics.so.3.1 # Unfortunately NuGet package don't support symlinks: https://github.com/NuGet/Home/issues/10734 # For SFML, we can just ship one version that CSFML will be looking for cp "$SFMLLibDir/libsfml-$MODULE.so.$SFMLMajorMinor" "$OutDir" diff --git a/tools/nuget/build.macos.sh b/tools/nuget/build.macos.sh index cfa76fc..9c17e58 100755 --- a/tools/nuget/build.macos.sh +++ b/tools/nuget/build.macos.sh @@ -46,7 +46,7 @@ echo "Please note that all SFML dependencies must be installed and available to RID="$1" -SFMLBranch="3.0.2" # The branch or tag of the SFML repository to be cloned +SFMLBranch="3.1.0" # The branch or tag of the SFML repository to be cloned CSFMLDir="$(grealpath "$(git rev-parse --show-toplevel)")" # The directory of the source code of CSFML OutDir="./CSFML/runtimes/$RID/native" # The base directory of all CSFML modules, used to copy the final libraries @@ -150,9 +150,9 @@ cmake --build . --config Release --target install # STEP 5: Copy result to the NuGet folders # # ======================================== # -SFMLMajorMinor="3.0" +SFMLMajorMinor="3.1" SFMLMajorMinorPatch="$SFMLMajorMinor.0" -CSFMLMajorMinor="3.0" +CSFMLMajorMinor="3.1" CSFMLMajorMinorPatch="$CSFMLMajorMinor.0" # Copies one SFML and CSFML module into the NuGet package @@ -168,7 +168,7 @@ copymodule() # SFML.Net only searches for the name with common pre- and suffixes # As such we need to ship e.g. libcsfml-graphics.dylib # But the CSFML libs will look for the major.minor version - # As such we also need to ship e.g. libcsfml-graphics.3.0.dylib + # As such we also need to ship e.g. libcsfml-graphics.3.1.dylib # Unfortunately NuGet package don't support symlinks: https://github.com/NuGet/Home/issues/10734 # For SFML, we can just ship one version that CSFML will be looking for cp "$SFMLLibDir/libsfml-$MODULE.$SFMLMajorMinor.dylib" "$OutDir" diff --git a/tools/nuget/build.win.ps1 b/tools/nuget/build.win.ps1 index 3385867..4cdbeef 100644 --- a/tools/nuget/build.win.ps1 +++ b/tools/nuget/build.win.ps1 @@ -43,7 +43,7 @@ Write-Output "Building $RID" Write-Output "Using $Generator as the cmake generator" Write-Output "Using architecture $ArchitectureCMake" -$SFMLBranch = "3.0.2" # The branch or tag of the SFML repository to be cloned +$SFMLBranch = "3.1.0" # The branch or tag of the SFML repository to be cloned $CSFMLDir = (Get-Item (git rev-parse --show-toplevel)).FullName # The directory of the source code of CSFML $OutDir = "./CSFML/runtimes/$RID/native" # The directory of all CSFML modules, used to copy the final dlls