diff --git a/CMakeLists.txt b/CMakeLists.txt index 2cdd7165d..c9f4c6fce 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -137,6 +137,8 @@ if(SFML_USE_SYSTEM_DEPS) endforeach() list(REMOVE_DUPLICATES CMAKE_IGNORE_PATH) +elseif(SFML_COMPILER_GCC AND GCC_COMPILER_VERSION MATCHES "ucrt") + message(FATAL_ERROR "The pre-compiled SFML dependencies for MinGW are not compatible with the UCRT. Either switch to the MSVCRT or build the dependencies yourself.") endif() if(SFML_COMPILER_MSVC) @@ -222,6 +224,14 @@ 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) + # set pkgconfig install directory + # this could be e.g. macports on mac or msys2 on windows etc. + set(SFML_PKGCONFIG_DIR "/${CMAKE_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) @@ -350,7 +360,7 @@ else() # NOTE: it's not required to link against SFML.framework set_target_properties(SFML PROPERTIES INSTALL_NAME_DIR "@rpath") if(NOT CMAKE_SKIP_BUILD_RPATH) - set_target_properties(${target} PROPERTIES BUILD_WITH_INSTALL_NAME_DIR TRUE) + set_target_properties(SFML PROPERTIES BUILD_WITH_INSTALL_NAME_DIR TRUE) endif() # install rule diff --git a/changelog.md b/changelog.md index ead194401..db2f95beb 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,18 @@ # Changelog +## Unreleased + +### General + +- Ensure GNUInstallDirs cache vars are included before first used (#2778, #2779) +- [macOS] Fix incorrect variable expansion (#2780) + +### 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 @@ -16,16 +29,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) -- Fixed RenderTexture being upside down on Android (#2730) -- Fix warnings in Linux OpenGL ES codepaths (#2747) +- [Android] Fixed RenderTexture being upside down on Android (#2730) +- [Linux] Fix warnings in Linux OpenGL ES codepaths (#2747) ### Audio diff --git a/cmake/Config.cmake b/cmake/Config.cmake index 62bf40fef..07c956c1b 100644 --- a/cmake/Config.cmake +++ b/cmake/Config.cmake @@ -16,45 +16,56 @@ if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows") endif() elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") set(SFML_OS_UNIX 1) + if(ANDROID) set(SFML_OS_ANDROID 1) + # use the OpenGL ES implementation on Android set(OPENGL_ES 1) else() set(SFML_OS_LINUX 1) + # don't use the OpenGL ES implementation on Linux set(OPENGL_ES 0) endif() elseif(CMAKE_SYSTEM_NAME MATCHES "^k?FreeBSD$") set(SFML_OS_FREEBSD 1) + # don't use the OpenGL ES implementation on FreeBSD set(OPENGL_ES 0) elseif(CMAKE_SYSTEM_NAME MATCHES "^OpenBSD$") set(SFML_OS_OPENBSD 1) + # don't use the OpenGL ES implementation on OpenBSD set(OPENGL_ES 0) elseif(CMAKE_SYSTEM_NAME MATCHES "^NetBSD$") set(SFML_OS_NETBSD 1) + # don't use the OpenGL ES implementation on NetBSD set(OPENGL_ES 0) elseif(${CMAKE_SYSTEM_NAME} STREQUAL "iOS") set(SFML_OS_IOS 1) + # As we want to find packages in our extlibs folder too # we need to tell CMake we want to search there instead set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) + # use the OpenGL ES implementation on iOS set(OPENGL_ES 1) elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") set(SFML_OS_MACOS 1) + # don't use the OpenGL ES implementation on macOS set(OPENGL_ES 0) elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Android") set(SFML_OS_ANDROID 1) + # use the OpenGL ES implementation on Android set(OPENGL_ES 1) + # comparing CMAKE_SYSTEM_NAME with "CYGWIN" generates a false warning depending on the CMake version # let's avoid it so the actual error is more visible elseif(${CYGWIN}) @@ -64,14 +75,6 @@ else() return() endif() -# set pkgconfig install directory -# this could be e.g. macports on mac or msys2 on windows etc. -set(SFML_PKGCONFIG_DIR "/${CMAKE_INSTALL_LIBDIR}/pkgconfig") - -if(SFML_OS_FREEBSD OR SFML_OS_OPENBSD OR SFML_OS_NETBSD) - set(SFML_PKGCONFIG_DIR "/libdata/pkgconfig") -endif() - # detect the compiler # Note: The detection is order is important because: # - Visual Studio can both use MSVC and Clang