CMake: allow dynamic builds on Android and Emscripten.
Same as in Corrade, they still default to static because that's the
least painful.
Plugins however still need to be forced to be built static on platforms
where the PluginManager doesn't have any support for dynamic plugins
implemented. The logic is now only simplified, to not have to change it
again when e.g. Android gets the needed bits implemented in
PluginManager.
Co-authored-by: Vladimír Vondruš <mosra@centrum.cz>
pull/168/head
LE GARREC Vincent3 years agocommitted byVladimír Vondruš
option(MAGNUM_BUILD_STATIC_PIC"Build static libraries and plugins with position-independent code"${ON_EXCEPT_EMSCRIPTEN})
cmake_dependent_option(MAGNUM_BUILD_STATIC_UNIQUE_GLOBALS"Build static libraries with globals unique across shared libraries"${ON_EXCEPT_EMSCRIPTEN}"MAGNUM_BUILD_STATIC"OFF)
option(MAGNUM_BUILD_PLUGINS_STATIC"Build static plugins (default are dynamic)"OFF)