Skip to content

Commit

Permalink
Bump SFML to 2.6.2
Browse files Browse the repository at this point in the history
Merge commit '2a08cf73654dcdfc99d12dd72f2f2ff3c82ec96e' into bump-sfml-2.6.2
  • Loading branch information
substring committed Nov 25, 2024
2 parents d0980ee + 2a08cf7 commit 67adc7b
Show file tree
Hide file tree
Showing 63 changed files with 854 additions and 534 deletions.
42 changes: 25 additions & 17 deletions extlibs/SFML/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,38 +11,46 @@ jobs:
fail-fast: false
matrix:
platform:
- { name: Windows VS2019, os: windows-2019 }
- { name: Windows VS2022, os: windows-2022 }
- { name: Windows VS2019, os: windows-2019 }
- { name: Windows VS2022, os: windows-2022 }
- { name: Windows VS2022 Clang, os: windows-2022, flags: -T ClangCL }
- { name: Linux GCC, os: ubuntu-20.04 }
- { name: Linux Clang, os: ubuntu-20.04, flags: -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ }
- { name: MacOS XCode, os: macos-11 }
- { name: Linux GCC, os: ubuntu-20.04 }
- { name: Linux Clang, os: ubuntu-20.04, flags: -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ }
- { name: Linux GCC OpenGL ES, os: ubuntu-20.04, flags: -DSFML_OPENGL_ES=ON }
- { name: macOS x64, os: macos-12 }
- { name: macOS arm64, os: macos-14 }
- { name: iOS, os: macos-12, flags: -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_ARCHITECTURES=arm64 }
- { name: iOS Xcode, os: macos-12, suffix: -- CODE_SIGNING_ALLOWED=NO, flags: -DCMAKE_SYSTEM_NAME=iOS -GXcode }
config:
- { name: Shared, flags: -DBUILD_SHARED_LIBS=TRUE }
- { name: Static, flags: -DBUILD_SHARED_LIBS=FALSE }
- { name: Shared, flags: -DBUILD_SHARED_LIBS=TRUE }
- { name: Static, flags: -DBUILD_SHARED_LIBS=FALSE }

exclude:
- platform: { name: iOS }
config: { name: Shared }
- platform: { name: iOS Xcode }
config: { name: Shared }

include:
- platform: { name: Windows VS2022, os: windows-2022 }
config: { name: Unity, flags: -DBUILD_SHARED_LIBS=TRUE -DCMAKE_UNITY_BUILD=ON }
- platform: { name: MacOS XCode, os: macos-11 }
- platform: { name: macOS, os: macos-12 }
config: { name: Frameworks, flags: -DSFML_BUILD_FRAMEWORKS=TRUE }
- platform: { name: MacOS XCode, os: macos-11 }
config: { name: iOS, flags: -DCMAKE_TOOLCHAIN_FILE=$GITHUB_WORKSPACE/cmake/toolchains/iOS.toolchain.cmake -DIOS_PLATFORM=SIMULATOR }
- platform: { name: Android, os: ubuntu-20.04 }
config: { name: x86, flags: -DCMAKE_ANDROID_ARCH_ABI=x86 -DCMAKE_SYSTEM_NAME=Android -DSFML_BUILD_TEST_SUITE=FALSE -DCMAKE_ANDROID_NDK=$GITHUB_WORKSPACE/android-ndk-r18b -DCMAKE_ANDROID_NDK_TOOLCHAIN_VERSION=clang -DCMAKE_ANDROID_STL_TYPE=c++_shared -DCMAKE_ANDROID_API=26 }
- platform: { name: Android, os: ubuntu-20.04 }
config: { name: armeabi-v7a, flags: -DCMAKE_ANDROID_ARCH_ABI=armeabi-v7a -DCMAKE_SYSTEM_NAME=Android -DSFML_BUILD_TEST_SUITE=FALSE -DCMAKE_ANDROID_NDK=$GITHUB_WORKSPACE/android-ndk-r18b -DCMAKE_ANDROID_NDK_TOOLCHAIN_VERSION=clang -DCMAKE_ANDROID_STL_TYPE=c++_shared -DCMAKE_ANDROID_API=26 }
- platform: { name: Android, os: ubuntu-20.04 }
- platform: { name: Android, os: ubuntu-20.04 }
config: { name: arm64-v8a, flags: -DCMAKE_ANDROID_ARCH_ABI=arm64-v8a -DCMAKE_SYSTEM_NAME=Android -DSFML_BUILD_TEST_SUITE=FALSE -DCMAKE_TOOLCHAIN_FILE=$GITHUB_WORKSPACE/android-ndk-r18b/build/cmake/android.toolchain.cmake -DCMAKE_ANDROID_NDK=$GITHUB_WORKSPACE/android-ndk-r18b -DCMAKE_ANDROID_NDK_TOOLCHAIN_VERSION=clang -DCMAKE_ANDROID_STL_TYPE=c++_shared -DCMAKE_ANDROID_API=26 }
- platform: { name: Android, os: ubuntu-20.04 }
- platform: { name: Android, os: ubuntu-20.04 }
config: { name: x86_64, flags: -DCMAKE_ANDROID_ARCH_ABI=x86_64 -DCMAKE_SYSTEM_NAME=Android -DSFML_BUILD_TEST_SUITE=FALSE -DCMAKE_TOOLCHAIN_FILE=$GITHUB_WORKSPACE/android-ndk-r18b/build/cmake/android.toolchain.cmake -DCMAKE_ANDROID_NDK=$GITHUB_WORKSPACE/android-ndk-r18b -DCMAKE_ANDROID_NDK_TOOLCHAIN_VERSION=clang -DCMAKE_ANDROID_STL_TYPE=c++_shared -DCMAKE_ANDROID_API=26 }
- platform: { name: Linux GCC, os: ubuntu-20.04 }
- platform: { name: Linux GCC, os: ubuntu-20.04 }
config: { name: Static DRM, flags: -DBUILD_SHARED_LIBS=FALSE -DSFML_USE_DRM=TRUE }
- platform: { name: Linux GCC, os: ubuntu-20.04 }
- platform: { name: Linux GCC, os: ubuntu-20.04 }
config: { name: Shared DRM, flags: -DBUILD_SHARED_LIBS=TRUE -DSFML_USE_DRM=TRUE }
steps:
- name: Checkout Code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Linux Dependencies
if: runner.os == 'Linux'
Expand All @@ -52,7 +60,7 @@ jobs:
- name: Install Android Components
if: matrix.platform.name == 'Android'
run: |
echo "y" | /usr/local/lib/android/sdk/tools/bin/sdkmanager --install "cmake;3.10.2.4988404" --sdk_root=ANDROID_SDK_ROOT
echo "y" | ${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager --install "cmake;3.10.2.4988404" --sdk_root=ANDROID_SDK_ROOT
sudo ln -sf /usr/local/lib/android/sdk/cmake/3.10.2.4988404/bin/cmake /usr/bin/cmake
wget -nv https://dl.google.com/android/repository/android-ndk-r18b-linux-x86_64.zip -P $GITHUB_WORKSPACE
unzip -qq -d $GITHUB_WORKSPACE android-ndk-r18b-linux-x86_64.zip
Expand All @@ -64,4 +72,4 @@ jobs:

- name: Build
shell: bash
run: cmake --build $GITHUB_WORKSPACE/build --config Release --target install
run: cmake --build $GITHUB_WORKSPACE/build --config Release --target install ${{matrix.platform.suffix}}
1 change: 1 addition & 0 deletions extlibs/SFML/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,6 @@ build/

# Cache/IDE folders
.cache/
.vs/
.vscode/
.idea/
67 changes: 33 additions & 34 deletions extlibs/SFML/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,7 @@ if (NOT CMAKE_VERSION VERSION_LESS 3.9)
cmake_policy(SET CMP0068 NEW)
endif()

if(NOT CMAKE_OSX_SYSROOT)
# query the path to the default SDK, will fail on non-macOS, but it's okay.
execute_process(COMMAND xcodebuild -sdk macosx -version Path
COMMAND head -n 1
COMMAND tr -d '\n'
OUTPUT_VARIABLE CMAKE_OSX_SYSROOT
ERROR_QUIET)
endif()
sfml_set_option(CMAKE_OSX_DEPLOYMENT_TARGET "13.0" STRING "The minimal iOS version that will be able to run the built binaries. Cannot be lower than 13.0")

# project name
project(SFML)
Expand All @@ -48,17 +41,13 @@ include(GNUInstallDirs)
# setup version numbers
set(VERSION_MAJOR 2)
set(VERSION_MINOR 6)
set(VERSION_PATCH 0)
set(VERSION_PATCH 2)

# add an option for choosing the build type (shared or static)
if(NOT (SFML_OS_IOS OR SFML_OS_ANDROID))
if(NOT SFML_OS_ANDROID)
sfml_set_option(BUILD_SHARED_LIBS TRUE BOOL "TRUE to build SFML as shared libraries, FALSE to build it as static libraries")
else()
if(SFML_OS_IOS)
set(BUILD_SHARED_LIBS FALSE)
elseif(SFML_OS_ANDROID)
set(BUILD_SHARED_LIBS TRUE)
endif()
set(BUILD_SHARED_LIBS TRUE)
endif()

# add an option for building the examples
Expand Down Expand Up @@ -91,22 +80,18 @@ endif()
sfml_set_option(SFML_BUILD_TEST_SUITE FALSE BOOL "TRUE to build the SFML test suite, FALSE to ignore it")

# macOS specific options
if(SFML_OS_MACOSX)
if(SFML_OS_MACOSX OR SFML_OS_IOS)
# add an option to build frameworks instead of dylibs (release only)
sfml_set_option(SFML_BUILD_FRAMEWORKS FALSE BOOL "TRUE to build SFML as frameworks libraries (release only), FALSE to build according to BUILD_SHARED_LIBS")

if (SFML_OS_IOS AND NOT SFML_BUILD_FRAMEWORKS AND BUILD_SHARED_LIBS)
message(FATAL_ERROR "Naked dynamic libs not supported for iOS, build static or frameworks instead")
endif()

# add an option to automatically install Xcode templates
sfml_set_option(SFML_INSTALL_XCODE_TEMPLATES FALSE BOOL "TRUE to automatically install the Xcode templates, FALSE to do nothing about it. The templates are compatible with Xcode 4 and 5.")
endif()

# iOS specific options
if(SFML_OS_IOS)
# At the moment the minimal deployement target version is 10.2 only because the externals for iOS were built with that requirement.
sfml_set_option(SFML_IOS_DEPLOYMENT_TARGET "10.2" STRING "The minimal iOS version that will be able to run the built binaries. Cannot be lower than 10.2.")

sfml_set_option(SFML_CODE_SIGN_IDENTITY "iPhone Developer" STRING "The code signing identity to use when building for a real device")
endif()

# Android options
if(SFML_OS_ANDROID)
# avoid missing libraries when building SFML for Android with NDK r19c and later
Expand Down Expand Up @@ -232,10 +217,9 @@ if(SFML_OS_WINDOWS)
foreach(flag
CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO)
if(${flag} MATCHES "/MD")
string(REGEX REPLACE "/MD" "/MT" ${flag} "${${flag}}")
endif()
string(REGEX REPLACE "/MDd|/MD|/MTd|/MT" "" ${flag} "${${flag}}")
endforeach()
add_compile_options(/MT$<$<CONFIG:Debug>:d>)
endif()
endif()

Expand Down Expand Up @@ -301,6 +285,17 @@ endif()
sfml_set_option(SFML_INSTALL_PKGCONFIG_FILES ${SFML_INSTALL_PKGCONFIG_DEFAULT} BOOL "TRUE to automatically install pkg-config files so other projects can find SFML")

if(SFML_INSTALL_PKGCONFIG_FILES)
# account for CMAKE_INSTALL_LIBDIR potentially being an absolute path
file(RELATIVE_PATH SFML_RELATIVE_INSTALL_LIBDIR ${CMAKE_INSTALL_PREFIX} ${CMAKE_INSTALL_FULL_LIBDIR})

# set pkgconfig install directory
# this could be e.g. macports on mac or msys2 on windows etc.
set(SFML_PKGCONFIG_DIR "/${SFML_RELATIVE_INSTALL_LIBDIR}/pkgconfig")

if(SFML_OS_FREEBSD OR SFML_OS_OPENBSD OR SFML_OS_NETBSD)
set(SFML_PKGCONFIG_DIR "/libdata/pkgconfig")
endif()

sfml_set_option(SFML_PKGCONFIG_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/${SFML_PKGCONFIG_DIR}" PATH "Install directory for SFML's pkg-config .pc files")

foreach(sfml_module IN ITEMS all system window graphics audio network)
Expand Down Expand Up @@ -330,6 +325,10 @@ else()
# find only "root" headers
file(GLOB SFML_HEADERS RELATIVE ${PROJECT_SOURCE_DIR} "include/SFML/*")

# Because we use generator expressions in the post build scripts we need to
# suppress the generation of "EFFECTIVE_PLATFORM_NAME" as it will fail
set_property(GLOBAL PROPERTY XCODE_EMIT_EFFECTIVE_PLATFORM_NAME OFF)

# in fact we have to fool cmake to copy all the headers in subdirectories
# to do that we have to add the "root" headers to the PUBLIC_HEADER
# then we can run a post script to copy the remaining headers
Expand Down Expand Up @@ -403,9 +402,9 @@ else()
set_target_properties(SFML PROPERTIES INSTALL_NAME_DIR "@rpath")
if(NOT CMAKE_SKIP_BUILD_RPATH)
if (CMAKE_VERSION VERSION_LESS 3.9)
set_target_properties(${target} PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE)
set_target_properties(SFML PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE)
else()
set_target_properties(${target} PROPERTIES BUILD_WITH_INSTALL_NAME_DIR TRUE)
set_target_properties(SFML PROPERTIES BUILD_WITH_INSTALL_NAME_DIR TRUE)
endif()
endif()

Expand All @@ -423,7 +422,10 @@ if(SFML_OS_WINDOWS)

if(NOT SFML_USE_SYSTEM_DEPS)
# install the binaries of SFML dependencies
if(ARCH_32BITS)
if(ARCH_ARM64)
install(DIRECTORY extlibs/bin/ARM64/ DESTINATION ${CMAKE_INSTALL_BINDIR})
install(DIRECTORY extlibs/libs-msvc-universal/ARM64/ DESTINATION ${CMAKE_INSTALL_LIBDIR})
elseif(ARCH_X86)
install(DIRECTORY extlibs/bin/x86/ DESTINATION ${CMAKE_INSTALL_BINDIR})
if(SFML_COMPILER_MSVC AND SFML_MSVC_VERSION LESS 14)
install(DIRECTORY extlibs/libs-msvc/x86/ DESTINATION ${CMAKE_INSTALL_LIBDIR})
Expand All @@ -432,7 +434,7 @@ if(SFML_OS_WINDOWS)
else()
install(DIRECTORY extlibs/libs-mingw/x86/ DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
elseif(ARCH_64BITS)
elseif(ARCH_X64)
install(DIRECTORY extlibs/bin/x64/ DESTINATION ${CMAKE_INSTALL_BINDIR})
if(SFML_COMPILER_MSVC AND SFML_MSVC_VERSION LESS 14)
install(DIRECTORY extlibs/libs-msvc/x64/ DESTINATION ${CMAKE_INSTALL_LIBDIR})
Expand Down Expand Up @@ -495,9 +497,6 @@ elseif(SFML_OS_MACOSX)

elseif(SFML_OS_IOS)

# fix CMake install rules broken for iOS (see http://public.kitware.com/Bug/view.php?id=12506)
install(DIRECTORY "${CMAKE_BINARY_DIR}/lib/\$ENV{CONFIGURATION}/" DESTINATION ${CMAKE_INSTALL_LIBDIR})

if(NOT SFML_USE_SYSTEM_DEPS)
# since the iOS libraries are built as static, we must install the SFML dependencies
# too so that the end user can easily link them to its final application
Expand Down
45 changes: 43 additions & 2 deletions extlibs/SFML/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,44 @@
# Changelog

## SFML 2.6.2

### General

- Ensure GNUInstallDirs cache vars are included before first used (#2778, #2779)
- [macOS] Fix incorrect variable expansion (#2780)
- Replace deprecated CMake command `exec_program` (#2888)
- Fix Doxygen Generation (#2986, #2812, #2813)
- [iOS] Use built-in iOS support for CMake (#3113)
- [Windows] Fix `SFML_USE_STATIC_STD_LIBS` behavior (#3131)
- [Windows] Add support for UCRT MinGW (#2289, #2821, #3054, #3115)
- [Windows] Add support for Windows ARM64 (#3111, #3176)
- Fix Nix pkg-config support (#2835)

### Window

**Bugfixes**

- Fix joystickButton being used for Joystick(Dis)Connected event (#2957)
- [Windows] Close the clipboard if we fail to empty it (#3043)
- [Android] Remove use of deprecated `ALooper_pollAll` (#3181, #3189)
- [macOS] Fix how macOS fullscreen video modes are detected (#2300, #3151)
- [macOS] Prevent unnecessary macOS input monitoring permission prompts (#2843, #3235)
- [Linux] Fix DRM mode setting to use SFML window dimensions (#3136)
- [Android] Fix wrong fullscreen resolution (#1349, #1559, #2396)

### Graphics

**Bugfixes**

- [Windows] Fix MSVC warning about uninitialized `sf::Glyph` members (#2929)
- Prevent crash when setting empty uniform array (#3185, #3186)

### Audio

**Bugfixes**

- Abort looping in SoundStream::streamData if an OpenAL error occurs (#1831, #2781)

## SFML 2.6.1

Also available on the website: https://www.sfml-dev.org/changelog.php#sfml-2.6.1
Expand All @@ -16,14 +55,16 @@ Also available on the website: https://www.sfml-dev.org/changelog.php#sfml-2.6.1

**Bugfixes**

- Fix macOS resize event bug (#2618)
- Skip ClientMessage events with other window ID unless it is for IM (#2651)
- [macOS] Fix macOS resize event bug (#2618)
- [Linux] Skip ClientMessage events with other window ID unless it is for IM (#2651)

### Graphics

**Bugfixes**

- Ensure OpenGL extensions are loaded before querying maximum texture size (#2603)
- [Android] Fixed RenderTexture being upside down on Android (#2730)
- [Linux] Fix warnings in Linux OpenGL ES codepaths (#2747)

### Audio

Expand Down
Loading

0 comments on commit 67adc7b

Please sign in to comment.