Browse Source

Platform: clarify CMake subproject setup for Sdl2Application.

Spent several hours trying to figure out why magnum-player built against
static SDL (which uses the flags documented here) was hellishly laggy.
Didn't expect it was due to timers missing. OTOH, why SDL does even
allow itself to be built in such an unusable state?
pull/557/head
Vladimír Vondruš 4 years ago
parent
commit
02e4aa4f20
  1. 13
      src/Magnum/Platform/Sdl2Application.h

13
src/Magnum/Platform/Sdl2Application.h

@ -227,14 +227,14 @@ necessary.
@code{.cmake} @code{.cmake}
# This is the most minimal set of features which still make Sdl2Application # This is the most minimal set of features which still make Sdl2Application
# work. If you need something from these, remove the setting. The SDL_AUDIO # work. If you need something from these, remove the setting. The SDL_AUDIO and
# option should not be needed either as Magnum doesn't use it, but if it's # SDL_EVENT options should not be needed either as Magnum doesn't use them, but
# disabled it causes linker errors. Either SDL_DLOPEN or SDL_LOADSO needs to be # if they're disabled they causes compiler or linker errors. Either SDL_DLOPEN
# enabled depending on the system to allow linking dependencies at runtime, so # or SDL_LOADSO needs to be enabled depending on the system to allow linking
# it's better to just leave them both on. # dependencies at runtime, so it's better to just leave them both on. The
# SDL_TIMERS option is important for rendering performance.
set(SDL_ATOMIC OFF CACHE BOOL "" FORCE) set(SDL_ATOMIC OFF CACHE BOOL "" FORCE)
set(SDL_CPUINFO OFF CACHE BOOL "" FORCE) set(SDL_CPUINFO OFF CACHE BOOL "" FORCE)
set(SDL_EVENTS OFF CACHE BOOL "" FORCE)
set(SDL_FILE OFF CACHE BOOL "" FORCE) set(SDL_FILE OFF CACHE BOOL "" FORCE)
set(SDL_FILESYSTEM OFF CACHE BOOL "" FORCE) set(SDL_FILESYSTEM OFF CACHE BOOL "" FORCE)
set(SDL_HAPTIC OFF CACHE BOOL "" FORCE) set(SDL_HAPTIC OFF CACHE BOOL "" FORCE)
@ -243,7 +243,6 @@ set(SDL_POWER OFF CACHE BOOL "" FORCE)
set(SDL_RENDER OFF CACHE BOOL "" FORCE) set(SDL_RENDER OFF CACHE BOOL "" FORCE)
set(SDL_SENSOR OFF CACHE BOOL "" FORCE) set(SDL_SENSOR OFF CACHE BOOL "" FORCE)
set(SDL_THREADS OFF CACHE BOOL "" FORCE) set(SDL_THREADS OFF CACHE BOOL "" FORCE)
set(SDL_TIMERS OFF CACHE BOOL "" FORCE)
# This assumes you want to have SDL as a static library. If not, set SDL_STATIC # This assumes you want to have SDL as a static library. If not, set SDL_STATIC
# to OFF instead. # to OFF instead.
set(SDL_SHARED OFF CACHE BOOL "" FORCE) set(SDL_SHARED OFF CACHE BOOL "" FORCE)

Loading…
Cancel
Save