This will later enable conditional compilation of APIs that depend on
the GL library (for example the Text library directly producing compiled
meshes instead of just plain vertex data).
Statically built plugins get imported automatically when using CMake
3.1 and newer. Otherwise simply #include a corresponding
importStaticPlugin.cpp file.
It's not like with SDL where we can't use <SDL2/SDL.h> due to macOS
packaged shipped without the SDL2 include directory.
This was just a bad copypaste from the FindSDL2.cmake module, probably.
On Emscripten this was equal to ";somebogusprefix" (as per the
toolchain), which got expanded into just somebogusprefix, losing the
empty string. Saving it back to CMAKE_FIND_LIBRARY_PREFIXES would cause
all subsequent find_library() calls to fail, because no library is named
somebogusprefixMagnum*.bc.
Thinking about this, the "somebogusprefix" was probably added "back
then" as a workaround to CMake complaining that I'm messing up in the
Find module. So I guess I can remove that as well.
Size of all executables got inflated by *half a megabyte* because of
this. I'm not sure if the change is worth it, so reverting for now.
This reverts commits
c01961ba6b5fb3f435ddfada6fba05
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.
There will be numerous additions to this one so it made sense to make it
a static library instead of a header-only library. That also allows
CMake users to just link to Magnum::OpenGLTester instead of going
through the pain of a huge branching in order to find a correct
windowless application just to run their tests. It could have been done
even without the static library using a INTERFACE target, but that
wouldn't work on CMake < 3.0 (which, unfortunately, quite a few people
are still stuck with).
Unfortunately it's already heavily used elsewhere so I had to go through
the pain of deprecating the old implementation. The old implementation
was header-only so it can't be just typedef'd to the new one as there
would be linker failures. So the old header is just kept as it was, with
only the macros reduced.
Emscripten bundles the OpenAL library implicitly, so there's no
OPENAL_LIBRARY needed. Also minor other changes required for extracting
the module out of the official location.
Enabled by default, makes the current Magnum context a thread-local
variable instead of a global one, so it's possible to have multiple
thread-local contexts. Might have some performance implications, that's
why it's possible to disable it (but enabled by default is the safer
option).
GCC 4.7 and Apple platforms don't support thread_local, but __thread
does the job too (though on iOS not until Xcode 7.3). Also had to move
it to file-local because MSVC doesn't like having thread local variables
as part of DLL interface. (And there is *of course* no way to disable
exporting one particular member. F' that.)