mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-12 15:14:35 +00:00
Use SDL2 Backend with OpenAL
This change implements openal to use the sdl2 backend. The main change in this is in openal-soft cmakeLists.txt it was not using our custom finders to find sdl2 for us before and so it had to be changed to a list append instead of a set. This needs to be remembered for future updates to openal
This commit is contained in:
parent
8756e35853
commit
87514151c4
3 changed files with 27 additions and 14 deletions
13
Tools/CMake/finders/FindSDL2.cmake
Normal file
13
Tools/CMake/finders/FindSDL2.cmake
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
if(TARGET SDL2)
|
||||
set(SDL2_FOUND TRUE)
|
||||
set(SDL2_INCLUDE_DIRS $<TARGET_PROPERTY:SDL2,INTERFACE_INCLUDE_DIRECTORIES>)
|
||||
set(SDL2_LIBRARIES SDL2)
|
||||
|
||||
# Provide a modern CMake alias
|
||||
if(NOT TARGET SDL2::SDL2)
|
||||
add_library(SDL2::SDL2 ALIAS SDL2)
|
||||
endif()
|
||||
else()
|
||||
set(SDL2_FOUND FALSE)
|
||||
message(FATAL_ERROR "SDL2 was not added with add_subdirectory before calling find_package(SDL2).")
|
||||
endif()
|
||||
Loading…
Add table
Add a link
Reference in a new issue