mirror of https://github.com/mosra/magnum.git
Browse Source
I'll be happy once I can delete all this brittle backwards compatibility
post-release. The problem is as follows -- when running CMake without
any options on Android, iOS, Emscripten or UWP, such as
cmake .. \
-DCMAKE_TOOLCHAIN_FILE=path/to/toolchains/generic/Emscripten.cmake
It sees that no MAGNUM_-prefixed options were used, and thus assumes the
backwards compatibility for unprefixed WITH_, TARGET_ etc is still
desired, which is the right thing to do.
But then, there was a branch that enables TARGET_GLES *unconditionally*
on mobile platforms, if the backwards compatibility mode is enabled.
That alone would be harmless on its own, just causing garbage in the
CMake cache, unfortunately right after it sees that TARGET_GLES was set
and enables also TARGET_GLES2, because that's the default behavior. So
then, when one does
cmake . -DMAGNUM_TARGET_GLES2=ON
It'll ignore that option and instead yells at the users that TARGET_GLES
was set by them and it's deprecated, even though none of that was
actually intended:
CMake Deprecation Warning at CMakeLists.txt:501 (message):
Unprefixed options such as TARGET_GLES2 are deprecated, use
MAGNUM_TARGET_GLES2 instead. Delete the unprefixed variable from
CMake cache or set both to the same value to silence this warning.
The fix is that it's no longer setting TARGET_GLES implicitly on mobile
platforms, but instead considers the mobile platforms as well in
addition to checking if TARGET_GLES is set. Which means the backwards
compatibility variable dependencies only get set if there's at least one
of them coming from the user, never by default.
pull/610/head
1 changed files with 3 additions and 8 deletions
Loading…
Reference in new issue