diff --git a/doc/building.dox b/doc/building.dox index c57f29f58..315938efd 100644 --- a/doc/building.dox +++ b/doc/building.dox @@ -481,6 +481,15 @@ thread-local Magnum contents. This is inherited from the @ref CORRADE_BUILD_MULTITHREADED option --- if you are sure that you will never need such feature, disable it when building Corrade itself. +Various plugin interfaces by default search for plugins in pre-defined +locations. By default those are defined to the installation location and can be +overriden using the `MAGNUM_PLUGINS_DIR`, `MAGNUM_PLUGINS_DEBUG_DIR` and +`MAGNUM_PLUGINS_RELEASE_DIR` CMake variables --- see also +@ref Trade::AbstractImporter::pluginSearchPaths() and equivalent functions in +other plugin interfaces. Another option is supplying the plugin search path +explicitly on the user side either using the same CMake variables (passed +through to preprocessor, see @ref cmake) or via other autodetection means. + The features used can be conveniently detected in depending projects both in CMake and C++ sources, see @ref cmake and @ref Magnum/Magnum.h for more information. See also @ref corrade-cmake and @ref Corrade/Corrade.h for @@ -638,14 +647,6 @@ There are also a few command-line utilities, also all disabled by default: - `WITH_IMAGECONVERTER` --- Build the @ref magnum-imageconverter "magnum-imageconverter" executable for converting images of different formats. -Some of these utilities operate with plugins and they search for them in the -default plugin locations. You can override these locations using the -`MAGNUM_PLUGINS_DIR` and `MAGNUM_PLUGINS_[DEBUG|RELEASE]_DIR` variables, much -like when using Magnum from dependent projects --- see @ref cmake for more -information. In particular, if you specify them as relative paths, the path -will be taken relative to executable location, which is useful for making -relocatable installations. - Note that each [namespace](namespaces.html) documentation, all @ref Platform library documentation and the @ref GL::OpenGLTester class documentation contain more detailed information about dependencies, availability on particular diff --git a/doc/cmake.dox b/doc/cmake.dox index b2aa0fdf4..96f1a6852 100644 --- a/doc/cmake.dox +++ b/doc/cmake.dox @@ -78,10 +78,7 @@ This module tries to find base Magnum library and then defines: library was found - `MAGNUM_PLUGINS_DIR` --- Base directory with dynamic plugins, defaults to `MAGNUM_PLUGINS_RELEASE_DIR` in release builds and multi-configuration - builds or to `MAGNUM_PLUGINS_DEBUG_DIR` in debug builds. You can modify all - three variable (e.g. set them to `.` when deploying on Windows with plugins - stored relatively to the executable), the following `MAGNUM_PLUGINS_*_DIR` - variables depend on it. + builds or to `MAGNUM_PLUGINS_DEBUG_DIR` in debug builds. - `MAGNUM_PLUGINS_FONT[|_DEBUG|_RELEASE]_DIR` --- Directory with dynamic font plugins - `MAGNUM_PLUGINS_FONTCONVERTER[|_DEBUG|_RELEASE]_DIR` --- Directory with @@ -216,7 +213,7 @@ release libraries). Note that this autodetection might fail for the `MAGNUM_PLUGINS_DIR` variable, especially on multi-configuration build systems. You can make use of @ref corrade-cmake "CORRADE_IS_DEBUG_BUILD" preprocessor variable along with `MAGNUM_PLUGINS_*_DEBUG_DIR` / `MAGNUM_PLUGINS_*_RELEASE_DIR` -variables to decide in preprocessing step. +variables to decide in preprocessing step instead. Features of found Magnum library are exposed in these CMake variables, they are also available as preprocessor variables if including diff --git a/modules/FindMagnum.cmake b/modules/FindMagnum.cmake index b75e94594..1f77aeeb8 100644 --- a/modules/FindMagnum.cmake +++ b/modules/FindMagnum.cmake @@ -25,9 +25,7 @@ # MAGNUM_PLUGINS_DIR - Base directory with dynamic plugins, defaults # to :variable:`MAGNUM_PLUGINS_RELEASE_DIR` in release builds and # multi-configuration builds or to :variable:`MAGNUM_PLUGINS_DEBUG_DIR` in -# debug builds. You can modify all three variables (e.g. set them to ``.`` -# when deploying on Windows with plugins stored relatively to the -# executable), the following ``MAGNUM_PLUGINS_*_DIR`` variables depend on it. +# debug builds # MAGNUM_PLUGINS_FONT[|_DEBUG|_RELEASE]_DIR - Directory with dynamic font # plugins # MAGNUM_PLUGINS_FONTCONVERTER[|_DEBUG|_RELEASE]_DIR - Directory with dynamic