Browse Source

CMake: document the MAGNUM_DEPLOY_PREFIX variable better.

pull/205/head
Vladimír Vondruš 8 years ago
parent
commit
88a1c94e16
  1. 3
      CMakeLists.txt
  2. 18
      doc/building.dox
  3. 4
      doc/cmake.dox

3
CMakeLists.txt

@ -163,6 +163,9 @@ if(BUILD_MULTITHREADED)
set(MAGNUM_BUILD_MULTITHREADED 1) set(MAGNUM_BUILD_MULTITHREADED 1)
endif() 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 "Build static libraries (default are shared)" OFF)
option(BUILD_STATIC_PIC "Build static libraries and plugins with position-independent code" ON) 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) option(BUILD_PLUGINS_STATIC "Build static plugins (default are dynamic)" OFF)

18
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 semi-automatically when using Magnum in depending projects, see @ref cmake for
more information. 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 The library is constantly evolving and thus some APIs are deprecated and then
later removed in favor of better ones. To preserve backwards compatibility, later removed in favor of better ones. To preserve backwards compatibility,
Magnum is by default built with all deprecated APIs included. However, to make 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. 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 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} @code{.sh}
mkdir build-emscripten && cd build-emscripten mkdir build-emscripten && cd build-emscripten
@ -730,6 +745,7 @@ cmake .. \
-DCMAKE_BUILD_TYPE=Release \ -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH=/usr/lib/emscripten/system \ -DCMAKE_PREFIX_PATH=/usr/lib/emscripten/system \
-DCMAKE_INSTALL_PREFIX=/usr/lib/emscripten/system \ -DCMAKE_INSTALL_PREFIX=/usr/lib/emscripten/system \
-DMAGNUM_DEPLOY_PREFIX=/srv/http/magnum \
-DWITH_SDL2APPLICATION=ON -DWITH_SDL2APPLICATION=ON
cmake --build . cmake --build .
@endcode @endcode

4
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_FOUND` --- Whether the library was found
- `Magnum::Magnum` --- Base library imported target - `Magnum::Magnum` --- Base library imported target
- `MAGNUM_DEPLOY_PREFIX` --- Prefix where to put final application - `MAGNUM_DEPLOY_PREFIX` --- Prefix where to put final application
executables, defaults to empty string. If a relative path is used, it's executables, defaults to `.`. If a relative path is used, it's relative to
relative to `CMAKE_INSTALL_PREFIX`. `CMAKE_INSTALL_PREFIX`.
- `MAGNUM_PLUGINS_DEBUG_DIR` --- Base directory with dynamic plugins for debug - `MAGNUM_PLUGINS_DEBUG_DIR` --- Base directory with dynamic plugins for debug
builds, defaults to `magnum-d/` subdirectory of dir where Magnum library builds, defaults to `magnum-d/` subdirectory of dir where Magnum library
was found was found

Loading…
Cancel
Save