It's meaningless to have *_INCLUDE_DIR point to the dir where
{egl.h,gl2.h,gl3.h} exists, because we're always including the files
using full path (e.g. <EGL/egl.h>). It then fails miserably at compile
time on platforms which don't have the parent directory in include path.
It's not needed to manually specify whole component dependency tree,
also each MAGNUM_*_LIBRARIES and MAGNUM_*_INCLUDE_DIRS variable now
lists all external and inter-project dependencies.
For example, if the user requires DebugTools component, it automatically
searches also for all the following components:
MeshTools
Primitives
SceneGraph
Shaders
Shapes
And MAGNUM_DEBUGTOOLS_LIBRARIES contains the following extensive list of
libraries:
MagnumDebugTools
MagnumMeshTools
MagnumPrimitives
MagnumSceneGraph
MagnumShaders
MagnumShapes
Magnum
CorradePluginManager
CorradeUtility
libGL
Currently it failed on "error when trying to open configure.h", which is
NOT a helpful message at all. Now we check for existence of the include
dir before trying to open the file, thus failing with proper "Could NOT
find Magnum" message.
Makes it possible to have both debug and release libraries installed. If
both libraries are present when finding the package, proper version is
used based on what configuration is used in depending project.
It now defaults to magnum/ subdirectory of dir where main Magnum library
was found. It was *annoying* to change /usr/local/lib/magnum to
/usr/lib/magnum _every time_.
As we are now using absolute includes, there is no need to prefix
everything with "magnum<Namespace>" etc. All generated configuration
files are renamed to configure.h and their path is included _before_
everything else to avoid accidental collisions.
Recommended fix:
https://github.com/mosra/magnum/blob/master/modules/FindSDL2.cmake#L46 to list only SDL_scancode.h (i.e. remove SDL.h)
Test:
Add SDL2 Lib to the /Libraries/Frameworks/
Builds file.
Add SDL2 Lib and SDL1 to the /Libraries/Frameworks/
Build fails.
Remove SDL.h from at line 46.
Builds fine.
Remove SDL 1 from the /Libraries/Frameworks/
Builds fine.