Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to SFML 3.0.0 #13276

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,6 @@
[submodule "Externals/Vulkan-Headers"]
path = Externals/Vulkan-Headers
url = https://github.com/KhronosGroup/Vulkan-Headers.git
[submodule "Externals/SFML/SFML"]
path = Externals/SFML/SFML
url = https://github.com/SFML/SFML.git
10 changes: 7 additions & 3 deletions CMake/FindSFML.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,14 @@ if(SFML_FIND_VERSION AND SFML_INCLUDE_DIR)
set(SFML_VERSION_OK FALSE)
endif()
else()
# SFML version is < 2.0
if (SFML_REQUESTED_VERSION GREATER 19)
# SFML version is < 3.0
if (SFML_REQUESTED_VERSION GREATER 29)
set(SFML_VERSION_OK FALSE)
set(SFML_VERSION_MAJOR 1)
if (SFML_REQUESTED_VERSION GREATER 19)
set(SFML_VERSION_MAJOR 1)
else()
set(SFML_VERSION_MAJOR 2)
endif()
set(SFML_VERSION_MINOR x)
endif()
endif()
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ if(NOT ANDROID)
add_definitions(-D__LIBUSB__)
endif()

dolphin_find_optional_system_library(SFML Externals/SFML 2.1 COMPONENTS network system)
dolphin_find_optional_system_library(SFML Externals/SFML 3.0 COMPONENTS Network System)

if(USE_UPNP)
dolphin_find_optional_system_library(MINIUPNPC Externals/miniupnpc 1.6)
Expand Down
35 changes: 19 additions & 16 deletions Externals/SFML/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,31 +1,34 @@
set(SRC_NETWORK
src/SFML/Network/Http.cpp
src/SFML/Network/IPAddress.cpp
src/SFML/Network/Packet.cpp
src/SFML/Network/Socket.cpp
src/SFML/Network/SocketSelector.cpp
src/SFML/Network/TcpListener.cpp
src/SFML/Network/TcpSocket.cpp
src/SFML/Network/UdpSocket.cpp
SFML/src/SFML/Network/Http.cpp
SFML/src/SFML/Network/IpAddress.cpp
SFML/src/SFML/Network/Packet.cpp
SFML/src/SFML/Network/Socket.cpp
SFML/src/SFML/Network/SocketSelector.cpp
SFML/src/SFML/Network/TcpListener.cpp
SFML/src/SFML/Network/TcpSocket.cpp
SFML/src/SFML/Network/UdpSocket.cpp
)

if(WIN32)
list(APPEND SRC_NETWORK src/SFML/Network/Win32/SocketImpl.cpp)
list(APPEND SRC_NETWORK SFML/src/SFML/Network/Win32/SocketImpl.cpp)
else()
list(APPEND SRC_NETWORK src/SFML/Network/Unix/SocketImpl.cpp)
list(APPEND SRC_NETWORK SFML/src/SFML/Network/Unix/SocketImpl.cpp)
endif()

set(SRC_SYSTEM
src/SFML/System/Err.cpp
src/SFML/System/String.cpp
src/SFML/System/Time.cpp
SFML/src/SFML/System/Err.cpp
SFML/include/SFML/System/String.hpp
SFML/src/SFML/System/String.cpp
SFML/src/SFML/System/Utils.cpp
)

add_library(sfml-network STATIC ${SRC_NETWORK})
add_library(sfml-system STATIC ${SRC_SYSTEM})
target_compile_features(sfml-network PUBLIC cxx_std_17)
target_compile_features(sfml-system PUBLIC cxx_std_17)
target_compile_definitions(sfml-system PUBLIC SFML_STATIC)
target_include_directories(sfml-system PUBLIC include PRIVATE src)
target_include_directories(sfml-network PUBLIC include PRIVATE src)
target_include_directories(sfml-system PUBLIC SFML/include PRIVATE SFML/src)
target_include_directories(sfml-network PUBLIC SFML/include PRIVATE SFML/src)
target_link_libraries(sfml-network PUBLIC sfml-system)
dolphin_disable_warnings(sfml-network)
dolphin_disable_warnings(sfml-system)
dolphin_disable_warnings(sfml-system)
1 change: 1 addition & 0 deletions Externals/SFML/SFML
Submodule SFML added at 7f1162
67 changes: 67 additions & 0 deletions Externals/SFML/SFML.vcxproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<Import Project="..\..\Source\VSProps\Base.Macros.props" />
<Import Project="$(VSPropsDir)Base.Targets.props" />
<PropertyGroup Label="Globals">
<ProjectGuid>{93D73454-2512-424E-9CDA-4BB357FE13DD}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VSPropsDir)Configuration.StaticLibrary.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings" />
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"
Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')"
Label="LocalAppDataPlatform" />
<Import Project="$(VSPropsDir)Base.props" />
<Import Project="$(VSPropsDir)ClDisableAllWarnings.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>SFML\include;SFML\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>SFML_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="SFML\src\SFML\Network\Http.cpp" />
<ClCompile Include="SFML\src\SFML\Network\IpAddress.cpp" />
<ClCompile Include="SFML\src\SFML\Network\Packet.cpp" />
<ClCompile Include="SFML\src\SFML\Network\Socket.cpp" />
<ClCompile Include="SFML\src\SFML\Network\SocketSelector.cpp" />
<ClCompile Include="SFML\src\SFML\Network\TcpListener.cpp" />
<ClCompile Include="SFML\src\SFML\Network\TcpSocket.cpp" />
<ClCompile Include="SFML\src\SFML\Network\UdpSocket.cpp" />
<ClCompile Include="SFML\src\SFML\Network\Win32\SocketImpl.cpp" />
<ClCompile Include="SFML\src\SFML\System\Err.cpp" />
<ClCompile Include="SFML\src\SFML\System\String.cpp" />
<ClCompile Include="SFML\src\SFML\System\Utils.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="SFML\include\SFML\Config.hpp" />
<ClInclude Include="SFML\include\SFML\Network.hpp" />
<ClInclude Include="SFML\include\SFML\Network\Export.hpp" />
<ClInclude Include="SFML\include\SFML\Network\Http.hpp" />
<ClInclude Include="SFML\include\SFML\Network\IPAddress.hpp" />
<ClInclude Include="SFML\include\SFML\Network\Packet.hpp" />
<ClInclude Include="SFML\include\SFML\Network\Socket.hpp" />
<ClInclude Include="SFML\include\SFML\Network\SocketHandle.hpp" />
<ClInclude Include="SFML\include\SFML\Network\SocketSelector.hpp" />
<ClInclude Include="SFML\include\SFML\Network\TcpListener.hpp" />
<ClInclude Include="SFML\include\SFML\Network\TcpSocket.hpp" />
<ClInclude Include="SFML\include\SFML\Network\UdpSocket.hpp" />
<ClInclude Include="SFML\include\SFML\System.hpp" />
<ClInclude Include="SFML\include\SFML\System\Err.hpp" />
<ClInclude Include="SFML\include\SFML\System\Export.hpp" />
<ClInclude Include="SFML\include\SFML\System\NonCopyable.hpp" />
<ClInclude Include="SFML\include\SFML\System\String.hpp" />
<ClInclude Include="SFML\include\SFML\System\String.inl" />
<ClInclude Include="SFML\include\SFML\System\Utf.hpp" />
<ClInclude Include="SFML\include\SFML\System\Utf.inl" />
<ClInclude Include="SFML\src\SFML\Network\SocketImpl.hpp" />
<ClInclude Include="SFML\src\SFML\Network\Win32\SocketImpl.hpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
66 changes: 0 additions & 66 deletions Externals/SFML/build/vc2010/SFML_Network.vcxproj

This file was deleted.

51 changes: 0 additions & 51 deletions Externals/SFML/build/vc2010/SFML_Network.vcxproj.filters

This file was deleted.

6 changes: 3 additions & 3 deletions Externals/SFML/exports.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
<Project>
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>$(ExternalsDir)SFML\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(ExternalsDir)SFML\SFML\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>SFML_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
<ProjectReference Include="$(ExternalsDir)SFML\build\vc2010\SFML_Network.vcxproj">
<ProjectReference Include="$(ExternalsDir)SFML\SFML.vcxproj">
<Project>{93d73454-2512-424e-9cda-4bb357fe13dd}</Project>
</ProjectReference>
</ItemGroup>
</Project>
</Project>
Loading