diff --git a/CMakeLists.txt b/CMakeLists.txt index 5a729ff29..7205ac83d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -163,6 +163,9 @@ if(BUILD_MULTITHREADED) set(MAGNUM_BUILD_MULTITHREADED 1) endif() +set(MAGNUM_DEPLOY_PREFIX "." + CACHE STRING "Prefix where to put final application executables") + option(BUILD_STATIC "Build static libraries (default are shared)" OFF) option(BUILD_STATIC_PIC "Build static libraries and plugins with position-independent code" ON) option(BUILD_PLUGINS_STATIC "Build static plugins (default are dynamic)" OFF) diff --git a/doc/building.dox b/doc/building.dox index 41cf1ad80..6649bac94 100644 --- a/doc/building.dox +++ b/doc/building.dox @@ -347,6 +347,18 @@ release configurations. The library and plugin distinction is handled semi-automatically when using Magnum in depending projects, see @ref cmake for more information. +Particular platforms have additional requirements when it comes to location of +installed files. The following variables are supported: + +- `LIB_SUFFIX` --- Setting this variable to `64` can be used to tell CMake to + install to `lib64/` instead of `lib/`. In most cases this variable is + autodetected, so you don't need to set it yourself. +- `MAGNUM_DEPLOY_PREFIX` --- Used on @ref CORRADE_TARGET_EMSCRIPTEN "Emscripten" + to override location where web demos and utilities (such as @ref magnum-info) + are installed, so you can have libraries installed to a system location and + utilities to your webserver, for example. Defaults to ``.``. If a relative + path is used, it's relative to `CMAKE_INSTALL_PREFIX`. + The library is constantly evolving and thus some APIs are deprecated and then later removed in favor of better ones. To preserve backwards compatibility, Magnum is by default built with all deprecated APIs included. However, to make @@ -721,7 +733,10 @@ enabled. Then create build directory and run `cmake` and the build command in it. WebGL 1.0 (GLES 2.0 equivalent) is enabled by default, switch to 2.0 (GLES 3.0 -equivalent) by disabling `TARGET_GLES2`. +equivalent) by disabling `TARGET_GLES2`. If you enable one of the +@ref magnum-info or @ref magnum-al-info utilities, you can override their +install location by setting `MAGNUM_DEPLOY_PREFIX` --- putting them for example +in your webserver root. @code{.sh} mkdir build-emscripten && cd build-emscripten @@ -730,6 +745,7 @@ cmake .. \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_PREFIX_PATH=/usr/lib/emscripten/system \ -DCMAKE_INSTALL_PREFIX=/usr/lib/emscripten/system \ + -DMAGNUM_DEPLOY_PREFIX=/srv/http/magnum \ -DWITH_SDL2APPLICATION=ON cmake --build . @endcode diff --git a/doc/cmake.dox b/doc/cmake.dox index a32434216..8b1631bb7 100644 --- a/doc/cmake.dox +++ b/doc/cmake.dox @@ -60,8 +60,8 @@ This module tries to find base Magnum library and then defines: - `Magnum_FOUND` --- Whether the library was found - `Magnum::Magnum` --- Base library imported target - `MAGNUM_DEPLOY_PREFIX` --- Prefix where to put final application - executables, defaults to empty string. If a relative path is used, it's - relative to `CMAKE_INSTALL_PREFIX`. + executables, defaults to `.`. If a relative path is used, it's relative to + `CMAKE_INSTALL_PREFIX`. - `MAGNUM_PLUGINS_DEBUG_DIR` --- Base directory with dynamic plugins for debug builds, defaults to `magnum-d/` subdirectory of dir where Magnum library was found