diff --git a/doc/changelog.dox b/doc/changelog.dox index bef5904d8..af73c8dc7 100644 --- a/doc/changelog.dox +++ b/doc/changelog.dox @@ -150,6 +150,9 @@ See also: and @ref Magnum/Platform/GlfwApplication.h (see [mosra/magnum#389](https://github.com/mosra/magnum/pull/389)) - `FindSDL2.cmake` got updated to link to all dependencies when using a statically built SDL on Windows +- `FindSDL2.cmake` now links to Metal in addition to other frameworks on iOS + and is updated to link to these only if SDL is statically built (see + [mosra/magnum#410](https://github.com/mosra/magnum/issues/410)) - `FindMagnum.cmake` now properly recognizes an optional dependency between @ref DebugTools and @ref Trade on GL-less builds - Various compiler warning fixes (see [mosra/magnum#406](https://github.com/mosra/magnum/pull/406)) diff --git a/modules/FindSDL2.cmake b/modules/FindSDL2.cmake index 6f1fb77c8..01fc6cff2 100644 --- a/modules/FindSDL2.cmake +++ b/modules/FindSDL2.cmake @@ -117,8 +117,8 @@ if(CORRADE_TARGET_WINDOWS) PATH_SUFFIXES ${_SDL2_RUNTIME_PATH_SUFFIX} ${_SDL2_LIBRARY_PATH_SUFFIX}) endif() -# iOS dependencies -if(CORRADE_TARGET_IOS) +# (Static) iOS dependencies +if(CORRADE_TARGET_IOS AND SDL2_LIBRARY MATCHES ".*libSDL2.a$") set(_SDL2_FRAMEWORKS AudioToolbox AVFoundation @@ -126,6 +126,7 @@ if(CORRADE_TARGET_IOS) CoreMotion Foundation GameController + Metal # needed since 2.0.8 QuartzCore UIKit) set(_SDL2_FRAMEWORK_LIBRARIES ) @@ -173,8 +174,8 @@ if(NOT TARGET SDL2::SDL2) INTERFACE_LINK_LIBRARIES Threads::Threads ${CMAKE_DL_LIBS}) endif() - # Link frameworks on iOS - if(CORRADE_TARGET_IOS) + # Link frameworks on iOS if we have a static SDL + if(CORRADE_TARGET_IOS AND SDL2_LIBRARY MATCHES ".*libSDL2.a$") set_property(TARGET SDL2::SDL2 APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${_SDL2_FRAMEWORK_LIBRARIES}) endif()