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
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.
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.)
Toggles between using CGL/GLX/WGL (requiring running graphical desktop
environment) or EGL (without display attachment) for command-line
utilities and GL tests. Also exposed to the user through
MAGNUM_TARGET_HEADLESS CMake and preprocessor variables.
Uses just EGL and no other platform toolkit, meaning that the same code
can be used on all platforms if the drivers support it. Should be
working for OpenGL ES for most drivers, however desktop OpenGL is
supported only on NVidia since version 355.
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.
Use case: user is calling find_package(Magnum REQUIRED Sdl2Application) in
a toplevel dir and in a subdir. The second call would unset the
MAGNUM_APPLICATION_LIBRARIES which is not correct, because it still is just
that one application.
Also, now instead of unsetting the variables are set to -NOTFOUND so they
produce an error when used as libraries/include directories for a target.
The actual WebGL 2 distinction was done as a part of previous WebGL
cleanup. It compiles, but is completely broken, as Emscripten has some
missing bits to go through at least Context class creation.
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