Skip to content

Commit

Permalink
[sfml] Update to SFML 2.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
badlogic committed Mar 1, 2022
1 parent 4cb0f16 commit 594bf66
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
26 changes: 13 additions & 13 deletions spine-sfml/c/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#
# First download and extract SFML 2.3.2 for the respective OS we are on
# First download and extract SFML 2.5.1 for the respective OS we are on
#
set(DEPS_DIR "${CMAKE_CURRENT_LIST_DIR}/dependencies/")
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(SFML_URL "http://www.sfml-dev.org/files/SFML-2.4.1-osx-clang.tar.gz")
set(SFML_DIR ${DEPS_DIR}/SFML-2.4.1-osx-clang)
set(SFML_URL "https://www.sfml-dev.org/files/SFML-2.5.1-macOS-clang.tar.gz")
set(SFML_DIR ${DEPS_DIR}/SFML-2.5.1-macos-clang)
if (NOT EXISTS "${SFML_DIR}")
message("Downloading SFML for Mac OS X")
file(DOWNLOAD "${SFML_URL}" "${DEPS_DIR}/sfml.tar.gz")
Expand All @@ -19,8 +19,8 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
)
endif()
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
set(SFML_URL "http://www.sfml-dev.org/files/SFML-2.4.1-linux-gcc-64-bit.tar.gz")
set(SFML_DIR ${DEPS_DIR}/SFML-2.4.1)
set(SFML_URL "https://www.sfml-dev.org/files/SFML-2.5.1-linux-gcc-64-bit.tar.gz")
set(SFML_DIR ${DEPS_DIR}/SFML-2.5.1)
if (NOT EXISTS ${SFML_DIR})
message("Downloading SFML for Linux 64-bit")
file(DOWNLOAD "${SFML_URL}" "${DEPS_DIR}/sfml.tar.gz")
Expand All @@ -30,8 +30,8 @@ elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
)
endif()
else()
set(SFML_URL "http://www.sfml-dev.org/files/SFML-2.4.1-windows-vc14-32-bit.zip")
set(SFML_DIR ${DEPS_DIR}/SFML-2.4.1)
set(SFML_URL "https://www.sfml-dev.org/files/SFML-2.5.1-windows-vc14-32-bit.zip")
set(SFML_DIR ${DEPS_DIR}/SFML-2.5.1)
if (NOT EXISTS ${SFML_DIR})
message("Downloading SFML for Windows 32-bit")
file(DOWNLOAD "${SFML_URL}" "${DEPS_DIR}/sfml.zip")
Expand All @@ -55,19 +55,19 @@ install(FILES ${INCLUDES} DESTINATION dist/include)
add_executable(spine-sfml-example example/main.cpp)

# Link in SFML libraries and OS dependencies like OpenGL
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
find_library(SFML SFML PATHS ${SFML_DIR}/Frameworks)
find_library(SFML_SYSTEM "sfml-system" PATHS ${SFML_DIR}/Frameworks)
find_library(SFML_WINDOW sfml-window PATHS ${SFML_DIR}/Frameworks)
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
find_library(SFML SFML PATHS ${SFML_DIR}/Frameworks)
find_library(SFML_SYSTEM "sfml-system" PATHS ${SFML_DIR}/Frameworks)
find_library(SFML_WINDOW sfml-window PATHS ${SFML_DIR}/Frameworks)
find_library(SFML_GRAPHICS sfml-graphics PATHS ${SFML_DIR}/Frameworks)
target_link_libraries(spine-sfml-example ${SFML} ${SFML_SYSTEM} ${SFML_WINDOW} ${SFML_GRAPHICS})
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
target_link_libraries(spine-sfml-example sfml-graphics sfml-window sfml-system)
else()
else()
set(SFML_LIBS ${SFML_DIR}/lib)
target_link_libraries(spine-sfml-example ${SFML_LIBS}/sfml-main-d.lib)
target_link_libraries(spine-sfml-example ${SFML_LIBS}/sfml-graphics-s-d.lib)
target_link_libraries(spine-sfml-example ${SFML_LIBS}/sfml-window-s-d.lib)
target_link_libraries(spine-sfml-example ${SFML_LIBS}/sfml-window-s-d.lib)
target_link_libraries(spine-sfml-example ${SFML_LIBS}/sfml-system-s-d.lib)
target_link_libraries(spine-sfml-example ${SFML_LIBS}/freetype.lib)
target_link_libraries(spine-sfml-example ${SFML_LIBS}/jpeg.lib)
Expand Down
14 changes: 7 additions & 7 deletions spine-sfml/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#
# First download and extract SFML 2.4.1 for the respective OS we are on
# First download and extract SFML 2.5.1 for the respective OS we are on
#
set(DEPS_DIR "${CMAKE_CURRENT_LIST_DIR}/dependencies/")
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(SFML_URL "http://www.sfml-dev.org/files/SFML-2.4.1-osx-clang.tar.gz")
set(SFML_DIR ${DEPS_DIR}/SFML-2.4.1-osx-clang)
set(SFML_URL "https://www.sfml-dev.org/files/SFML-2.5.1-macOS-clang.tar.gz")
set(SFML_DIR ${DEPS_DIR}/SFML-2.5.1-macos-clang)
if (NOT EXISTS "${SFML_DIR}")
message("Downloading SFML for Mac OS X")
file(DOWNLOAD "${SFML_URL}" "${DEPS_DIR}/sfml.tar.gz")
Expand All @@ -19,8 +19,8 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
)
endif()
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
set(SFML_URL "http://www.sfml-dev.org/files/SFML-2.4.1-linux-gcc-64-bit.tar.gz")
set(SFML_DIR ${DEPS_DIR}/SFML-2.4.1)
set(SFML_URL "https://www.sfml-dev.org/files/SFML-2.5.1-linux-gcc-64-bit.tar.gz")
set(SFML_DIR ${DEPS_DIR}/SFML-2.5.1)
if (NOT EXISTS ${SFML_DIR})
message("Downloading SFML for Linux 64-bit")
file(DOWNLOAD "${SFML_URL}" "${DEPS_DIR}/sfml.tar.gz")
Expand All @@ -30,8 +30,8 @@ elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
)
endif()
else()
set(SFML_URL "http://www.sfml-dev.org/files/SFML-2.4.1-windows-vc14-32-bit.zip")
set(SFML_DIR ${DEPS_DIR}/SFML-2.4.1)
set(SFML_URL "https://www.sfml-dev.org/files/SFML-2.5.1-windows-vc14-32-bit.zip")
set(SFML_DIR ${DEPS_DIR}/SFML-2.5.1)
if (NOT EXISTS ${SFML_DIR})
message("Downloading SFML for Windows 32-bit")
file(DOWNLOAD "${SFML_URL}" "${DEPS_DIR}/sfml.zip")
Expand Down

0 comments on commit 594bf66

Please sign in to comment.