Browse Source

modules: deduuplicate macOS and iOS framework lists in FindSDL2.

pull/539/head
Vladimír Vondruš 4 years ago
parent
commit
f62178d539
  1. 17
      modules/FindSDL2.cmake

17
modules/FindSDL2.cmake

@ -174,12 +174,15 @@ if(CORRADE_TARGET_WINDOWS)
PATH_SUFFIXES ${_SDL2_RUNTIME_PATH_SUFFIX} ${_SDL2_LIBRARY_PATH_SUFFIX}) PATH_SUFFIXES ${_SDL2_RUNTIME_PATH_SUFFIX} ${_SDL2_LIBRARY_PATH_SUFFIX})
endif() endif()
# (Static) macOS / iOS dependencies # (Static) macOS / iOS dependencies. On macOS these were mainly needed when
# building SDL statically using its CMake project, on iOS always.
if(CORRADE_TARGET_APPLE AND SDL2_LIBRARY MATCHES "${CMAKE_STATIC_LIBRARY_SUFFIX}$") if(CORRADE_TARGET_APPLE AND SDL2_LIBRARY MATCHES "${CMAKE_STATIC_LIBRARY_SUFFIX}$")
set(_SDL2_FRAMEWORKS
AudioToolbox
AVFoundation
Foundation)
if(CORRADE_TARGET_IOS) if(CORRADE_TARGET_IOS)
set(_SDL2_FRAMEWORKS list(APPEND _SDL2_FRAMEWORKS
AudioToolbox
AVFoundation
CoreGraphics CoreGraphics
CoreMotion CoreMotion
Foundation Foundation
@ -188,17 +191,13 @@ if(CORRADE_TARGET_APPLE AND SDL2_LIBRARY MATCHES "${CMAKE_STATIC_LIBRARY_SUFFIX}
QuartzCore QuartzCore
UIKit) UIKit)
else() else()
# Those are needed when building SDL statically using its CMake project list(APPEND _SDL2_FRAMEWORKS
set(_SDL2_FRAMEWORKS
iconv # should be in the system iconv # should be in the system
AudioToolbox
AVFoundation
Carbon Carbon
Cocoa Cocoa
CoreAudio CoreAudio
CoreVideo CoreVideo
ForceFeedback ForceFeedback
Foundation
IOKit) IOKit)
endif() endif()
set(_SDL2_FRAMEWORK_LIBRARIES ) set(_SDL2_FRAMEWORK_LIBRARIES )

Loading…
Cancel
Save