Should not have any functional change, however we can now use the
imported target (instead of a variable that can be empty if threads
are not found), using REQUIRED because otherwise it makes no sense, and
checking explicitly for both libraries instead of the merged variable
(because there it's only an accident it actually works).
This is already done in the FindMagnum module for both, but not in the
source tree -- for SDL2 it was done in the FindSDL2 module (seems a
strange place) and for GLFW nowhere. To make things consistent, I'm
doing that in the Platform CMakeLists now and removed it from FindSDL2.
Hopefully this doesn't break anyone's workflow (static builds of
SDL2/GLFW?). In that case we would need to re-add it to the Find
modules as well.
Do the same also for other Unix-like systems except for Apple platforms,
where those dependencies are most probably satisfied by some frameworks
instead.
This affect virtually *all* targets so I would need to put this
everywhere, which I'm not. I am putting this only for the most often
used (and thus most problematic) dependencies, which is SDL and GLFW.
As with Corrade, this is not exactly backwards compatible, but for
common use case without OBJECT libraries this should not be a problem.
In any case, recreate the build dir and update your copy of all
Find*.cmake modules to avoid weird things happening.
User-facing changes:
* Documentation of all Find*.cmake modules converted to
reStructuredText to follow official CMake guidelines.
* The newfangled way to use the libraries is to link to Magnum::Shaders
instead of adding ${MAGNUM_SHADERS_INCLUDE_DIRS} to include path and
linking to ${MAGNUM_SHADERS_LIBRARIES}.
* The old ${MAGNUM_*_LIBRARIES} are deprecated and now just expand to
Magnum::* target. Use the target directly. These are also enabled
only when building with MAGNUM_BUILD_DEPRECATED.
* The old ${MAGNUM_*_INCLUDE_DIRS} are removed as the Magnum::* targets
cover these too.
Internal changes:
* Global state such as include_directories() was replaced with
target-specific settings.