mirror of
https://github.com/etlegacy/etlegacy-libs.git
synced 2024-11-10 06:42:14 +00:00
cmake: map sdl to renderer features
This commit is contained in:
parent
cc36e8e9f0
commit
72d4180a2e
1 changed files with 26 additions and 11 deletions
|
@ -929,20 +929,35 @@ if(BUNDLED_SDL AND BUILD_CLIENT)
|
|||
|
||||
etl_setup_cmake_args(SDL_CMAKE_ARGS
|
||||
-DSDL_RENDER_D3D=OFF -DSDL_RENDER_METAL=OFF -DSDL_RENDER=OFF
|
||||
-DSDL_DUMMYVIDEO=OFF -DSDL_OPENGL=ON -DSDL_VULKAN=OFF -DSDL_KMSDRM=OFF
|
||||
-DSDL_SHARED=OFF -DSDL_SNDIO=OFF -DSDL_LIBC=ON -DSDL_PIPEWIRE=OFF -DSDL_JACK=OFF)
|
||||
-DSDL_DUMMYVIDEO=OFF -DSDL_KMSDRM=OFF -DSDL_SHARED=OFF
|
||||
-DSDL_SNDIO=OFF -DSDL_LIBC=ON -DSDL_PIPEWIRE=OFF -DSDL_JACK=OFF)
|
||||
|
||||
if(FEATURE_RENDERER1 OR FEATURE_RENDERER2)
|
||||
list(APPEND SDL_CMAKE_ARGS -DSDL_OPENGL=ON)
|
||||
else()
|
||||
list(APPEND SDL_CMAKE_ARGS -DSDL_OPENGL=OFF)
|
||||
endif()
|
||||
|
||||
# Wayland requires OpenglES support so that's why its enabled here.
|
||||
if(FEATURE_RENDERER_GLES OR (UNIX AND NOT APPLE))
|
||||
list(APPEND SDL_CMAKE_ARGS -DSDL_OPENGLES=ON)
|
||||
else()
|
||||
list(APPEND SDL_CMAKE_ARGS -DSDL_OPENGLES=OFF)
|
||||
endif()
|
||||
|
||||
if(FEATURE_RENDERER_VULKAN)
|
||||
list(APPEND SDL_CMAKE_ARGS -DSDL_VULKAN=ON)
|
||||
else()
|
||||
list(APPEND SDL_CMAKE_ARGS -DSDL_VULKAN=OFF)
|
||||
endif()
|
||||
|
||||
# Bye bye X11
|
||||
if(APPLE)
|
||||
set(SDL_CMAKE_ARGS ${SDL_CMAKE_ARGS} -DSDL_VIDEO_X11=OFF -DSDL_X11=OFF -DSDL_VIDEO_X11_XINPUT=OFF -DSDL_WAYLAND=OFF -DSDL_OPENGLES=OFF -DSDL_METAL=OFF -DSDL_COCOA=ON)
|
||||
elseif(UNIX AND NOT APPLE)
|
||||
# Wayland requires OpenglES support so that's why its enabled here.
|
||||
set(SDL_CMAKE_ARGS ${SDL_CMAKE_ARGS} -DSDL_X11=ON -DSDL_VIDEO_X11=ON -DSDL_VIDEO_X11_XINPUT=ON -DSDL_WAYLAND=ON -DSDL_OPENGLES=ON)
|
||||
elseif(ETL_ARM)
|
||||
# Wayland requires OpenglES support so that's why its enabled here.
|
||||
set(SDL_CMAKE_ARGS ${SDL_CMAKE_ARGS} -DSDL_X11=ON -DSDL_VIDEO_X11=ON -DSDL_VIDEO_X11_XINPUT=OFF -DSDL_WAYLAND=ON -DSDL_OPENGLES=ON)
|
||||
# Bye bye X11
|
||||
list(APPEND SDL_CMAKE_ARGS -DSDL_VIDEO_X11=OFF -DSDL_X11=OFF -DSDL_VIDEO_X11_XINPUT=OFF -DSDL_WAYLAND=OFF -DSDL_METAL=OFF -DSDL_COCOA=ON)
|
||||
elseif(UNIX)
|
||||
list(APPEND SDL_CMAKE_ARGS -DSDL_X11=ON -DSDL_VIDEO_X11=ON -DSDL_VIDEO_X11_XINPUT=ON -DSDL_WAYLAND=ON)
|
||||
elseif(WIN32)
|
||||
set(SDL_CMAKE_ARGS ${SDL_CMAKE_ARGS} -DSDL_OPENGLES=${FEATURE_RENDERER_GLES} -DSDL_FORCE_STATIC_VCRT=ON)
|
||||
list(APPEND SDL_CMAKE_ARGS -DSDL_FORCE_STATIC_VCRT=ON)
|
||||
endif()
|
||||
|
||||
# In the current version (2.26.4) there are files that do not conform to ansi c89 so patch them
|
||||
|
|
Loading…
Reference in a new issue