Skip to content

Commit

Permalink
Merge pull request #23 from oomek/master
Browse files Browse the repository at this point in the history
Update to SFML 2.5.1
  • Loading branch information
mickelson authored Sep 25, 2020
2 parents 963c457 + 05db122 commit ac2c264
Show file tree
Hide file tree
Showing 396 changed files with 9,565 additions and 3,847 deletions.
19 changes: 12 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/Config.cmake)

# setup version numbers
set(VERSION_MAJOR 2)
set(VERSION_MINOR 4)
set(VERSION_PATCH 2)
set(VERSION_MINOR 5)
set(VERSION_PATCH 1)

# add the SFML header path
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
Expand Down Expand Up @@ -128,6 +128,9 @@ if(SFML_OS_ANDROID)
add_definitions("-DSTL_LIBRARY=${ANDROID_STL}")
endif()

# let the user switch ABIs
set(ANDROID_ABI "armeabi-v7a" CACHE STRING "Look at the NDK docs for currently supported ABIs")

# this is a workaround to compile sfml-activity without the stl library as a dependency
# we save the original compilation command line to restore it later in Macro.cmake
set(CMAKE_CXX_CREATE_SHARED_LIBRARY_WITH_STL ${CMAKE_CXX_CREATE_SHARED_LIBRARY})
Expand Down Expand Up @@ -498,15 +501,17 @@ 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)
# fix CMake install rules broken for iOS (see https://public.kitware.com/Bug/view.php?id=12506)
if(SFML_OS_IOS)
install(DIRECTORY "${CMAKE_BINARY_DIR}/lib/\$ENV{CONFIGURATION}/" DESTINATION lib${LIB_SUFFIX})
endif()

# 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
if(SFML_BUILD_GRAPHICS)
install(FILES extlibs/libs-ios/libfreetype.a extlibs/libs-ios/libjpeg.a DESTINATION lib)
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
if(SFML_BUILD_GRAPHICS)
install(FILES extlibs/libs-ios/libfreetype.a DESTINATION lib)
endif()
endif()

elseif(SFML_OS_ANDROID)
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

You would like to see a feature implemented or a bug fixed in SFML? Great! Contributions to SFML are highly appreciated, be it in the form of general ideas, concrete suggestions or code patches.

[A few guiding rules have been set up on the SFML website](http://www.sfml-dev.org/contribute.php) that you should be aware of before opening an Issue or Pull Request. They will help you focus on the important stuff and prevent you from losing (y)our time with requests that are out of SFML's scope, known issues, and so on.
[A few guiding rules have been set up on the SFML website](https://www.sfml-dev.org/contribute.php) that you should be aware of before opening an Issue or Pull Request. They will help you focus on the important stuff and prevent you from losing (y)our time with requests that are out of SFML's scope, known issues, and so on.

Those rules cover the general scope defined for this project, a coding style, and a precise procedure to report bugs or suggest new features.
268 changes: 217 additions & 51 deletions changelog.md

Large diffs are not rendered by default.

64 changes: 44 additions & 20 deletions cmake/Macros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -209,26 +209,50 @@ macro(sfml_add_example target)
endmacro()

# macro to find packages on the host OS
# this is the same as in the toolchain file, which is here for Nsight Tegra VS
# since it won't use the Android toolchain file
if(CMAKE_VS_PLATFORM_NAME STREQUAL "Tegra-Android")
macro(find_host_package)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER)
if(CMAKE_HOST_WIN32)
set(WIN32 1)
set(UNIX)
elseif(CMAKE_HOST_APPLE)
set(APPLE 1)
set(UNIX)
# We do not use the custom toolchain anymore, so we need to define
# the macro here
if(SFML_OS_ANDROID)
# macro to find packages on the host OS
macro( find_host_package )
set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER )
set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY NEVER )
set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER )
if( CMAKE_HOST_WIN32 )
SET( WIN32 1 )
SET( UNIX )
elseif( CMAKE_HOST_APPLE )
SET( APPLE 1 )
SET( UNIX )
endif()
find_package(${ARGN})
set(WIN32)
set(APPLE)
set(UNIX 1)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
find_package( ${ARGN} )
SET( WIN32 )
SET( APPLE )
SET( UNIX 1 )
set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY )
set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY )
set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )
endmacro()


# macro to find programs on the host OS
macro( find_host_program )
set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER )
set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY NEVER )
set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER )
if( CMAKE_HOST_WIN32 )
SET( WIN32 1 )
SET( UNIX )
elseif( CMAKE_HOST_APPLE )
SET( APPLE 1 )
SET( UNIX )
endif()
find_program( ${ARGN} )
SET( WIN32 )
SET( APPLE )
SET( UNIX 1 )
set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY )
set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY )
set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )
endmacro()
endif()

3 changes: 1 addition & 2 deletions cmake/Modules/FindSFML.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -311,10 +311,9 @@ if(SFML_STATIC_LIBRARIES)

# find libraries
find_sfml_dependency(FREETYPE_LIBRARY "FreeType" freetype)
find_sfml_dependency(JPEG_LIBRARY "libjpeg" jpeg)

# update the list
set(SFML_GRAPHICS_DEPENDENCIES ${FREETYPE_LIBRARY} ${JPEG_LIBRARY})
set(SFML_GRAPHICS_DEPENDENCIES ${FREETYPE_LIBRARY})
set(SFML_DEPENDENCIES ${SFML_GRAPHICS_DEPENDENCIES} ${SFML_DEPENDENCIES})
endif()

Expand Down
47 changes: 1 addition & 46 deletions cmake/toolchains/android.toolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1555,51 +1555,6 @@ set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY )
set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY )
set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )


# macro to find packages on the host OS
macro( find_host_package )
set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER )
set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY NEVER )
set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER )
if( CMAKE_HOST_WIN32 )
SET( WIN32 1 )
SET( UNIX )
elseif( CMAKE_HOST_APPLE )
SET( APPLE 1 )
SET( UNIX )
endif()
find_package( ${ARGN} )
SET( WIN32 )
SET( APPLE )
SET( UNIX 1 )
set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY )
set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY )
set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )
endmacro()


# macro to find programs on the host OS
macro( find_host_program )
set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER )
set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY NEVER )
set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER )
if( CMAKE_HOST_WIN32 )
SET( WIN32 1 )
SET( UNIX )
elseif( CMAKE_HOST_APPLE )
SET( APPLE 1 )
SET( UNIX )
endif()
find_program( ${ARGN} )
SET( WIN32 )
SET( APPLE )
SET( UNIX 1 )
set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY )
set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY )
set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )
endmacro()


# export toolchain settings for the try_compile() command
if( NOT _CMAKE_IN_TRY_COMPILE )
set( __toolchain_config "")
Expand Down Expand Up @@ -1715,4 +1670,4 @@ endif()
# ANDROID_DEFAULT_NDK_API_LEVEL_${ARCH}
# ANDROID_NDK_SEARCH_PATHS
# ANDROID_SUPPORTED_ABIS_${ARCH}
# ANDROID_SUPPORTED_NDK_VERSIONS
# ANDROID_SUPPORTED_NDK_VERSIONS
Loading

0 comments on commit ac2c264

Please sign in to comment.