mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
Add SDL as a submodule
This commit is contained in:
@ -493,6 +493,7 @@
|
||||
<ClInclude Include="InputCommon\ControllerInterface\Wiimote\WiimoteController.h" />
|
||||
<ClInclude Include="InputCommon\ControllerInterface\Win32\Win32.h" />
|
||||
<ClInclude Include="InputCommon\ControllerInterface\XInput\XInput.h" />
|
||||
<ClInclude Include="InputCommon\ControllerInterface\SDL\SDL.h" />
|
||||
<ClInclude Include="InputCommon\ControlReference\ControlReference.h" />
|
||||
<ClInclude Include="InputCommon\ControlReference\ExpressionParser.h" />
|
||||
<ClInclude Include="InputCommon\ControlReference\FunctionExpression.h" />
|
||||
@ -1104,6 +1105,7 @@
|
||||
<ClCompile Include="InputCommon\ControllerInterface\Wiimote\WiimoteController.cpp" />
|
||||
<ClCompile Include="InputCommon\ControllerInterface\Win32\Win32.cpp" />
|
||||
<ClCompile Include="InputCommon\ControllerInterface\XInput\XInput.cpp" />
|
||||
<ClCompile Include="InputCommon\ControllerInterface\SDL\SDL.cpp" />
|
||||
<ClCompile Include="InputCommon\ControlReference\ControlReference.cpp" />
|
||||
<ClCompile Include="InputCommon\ControlReference\ExpressionParser.cpp" />
|
||||
<ClCompile Include="InputCommon\ControlReference\FunctionExpression.cpp" />
|
||||
|
@ -174,32 +174,12 @@ if(UNIX)
|
||||
)
|
||||
endif()
|
||||
|
||||
if(ENABLE_SDL)
|
||||
find_package(SDL2)
|
||||
if(SDL2_FOUND)
|
||||
message(STATUS "Using shared SDL2")
|
||||
set(SDL_TARGET SDL2::SDL2)
|
||||
else()
|
||||
# SDL2 not found, try SDL
|
||||
find_package(SDL)
|
||||
if(SDL_FOUND)
|
||||
message(STATUS "Using shared SDL")
|
||||
add_library(System_SDL INTERFACE)
|
||||
target_include_directories(System_SDL INTERFACE ${SDL_INCLUDE_DIR})
|
||||
target_link_libraries(System_SDL INTERFACE ${SDL_LIBRARY})
|
||||
set(SDL_TARGET System_SDL)
|
||||
endif()
|
||||
endif()
|
||||
if(SDL_TARGET AND TARGET ${SDL_TARGET})
|
||||
target_sources(inputcommon PRIVATE
|
||||
ControllerInterface/SDL/SDL.cpp
|
||||
ControllerInterface/SDL/SDL.h
|
||||
)
|
||||
target_link_libraries(inputcommon PRIVATE ${SDL_TARGET})
|
||||
target_compile_definitions(inputcommon PRIVATE "CIFACE_USE_SDL=1")
|
||||
else()
|
||||
message(STATUS "SDL NOT found, disabling SDL input")
|
||||
endif()
|
||||
if(SDL2_FOUND)
|
||||
target_sources(inputcommon PRIVATE
|
||||
ControllerInterface/SDL/SDL.cpp
|
||||
ControllerInterface/SDL/SDL.h
|
||||
)
|
||||
target_link_libraries(inputcommon PRIVATE SDL2::SDL2)
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
|
@ -30,6 +30,9 @@
|
||||
#define CIFACE_USE_PIPES
|
||||
#endif
|
||||
#define CIFACE_USE_DUALSHOCKUDPCLIENT
|
||||
#if defined(HAVE_SDL2)
|
||||
#define CIFACE_USE_SDL
|
||||
#endif
|
||||
|
||||
namespace ciface
|
||||
{
|
||||
|
Reference in New Issue
Block a user