Browse Source

Provide MAGNUM_TARGET_WEBGL also in CMake.

pull/55/merge
Vladimír Vondruš 12 years ago
parent
commit
68016dbee3
  1. 1
      doc/cmake.dox
  2. 5
      modules/FindMagnum.cmake

1
doc/cmake.dox

@ -167,6 +167,7 @@ are also available as preprocessor variables if including @ref Magnum/Magnum.h:
- `MAGNUM_TARGET_GLES3` -- Defined if compiled for OpenGL ES 3.0
- `MAGNUM_TARGET_DESKTOP_GLES` -- Defined if compiled with OpenGL ES
emulation on desktop OpenGL
- `MAGNUM_TARGET_WEBGL` --- Defined if compiled for WebGL
If `MAGNUM_BUILD_DEPRECATED` is defined, the `MAGNUM_INCLUDE_DIR` variable also
contains path directly to Magnum directory (i.e. for includes without `Magnum/`

5
modules/FindMagnum.cmake

@ -92,6 +92,7 @@
# MAGNUM_TARGET_GLES3 - Defined if compiled for OpenGL ES 3.0
# MAGNUM_TARGET_DESKTOP_GLES - Defined if compiled with OpenGL ES
# emulation on desktop OpenGL
# MAGNUM_TARGET_WEBGL - Defined if compiled for WebGL
#
# If `MAGNUM_BUILD_DEPRECATED` is defined, the `MAGNUM_INCLUDE_DIR` variable
# also contains path directly to Magnum directory (i.e. for includes without
@ -207,6 +208,10 @@ string(FIND "${_magnumConfigure}" "#define MAGNUM_TARGET_DESKTOP_GLES" _TARGET_D
if(NOT _TARGET_DESKTOP_GLES EQUAL -1)
set(MAGNUM_TARGET_DESKTOP_GLES 1)
endif()
string(FIND "${_magnumConfigure}" "#define MAGNUM_TARGET_WEBGL" _TARGET_WEBGL)
if(NOT _TARGET_WEBGL EQUAL -1)
set(MAGNUM_TARGET_WEBGL 1)
endif()
# Dependent libraries and includes
set(MAGNUM_INCLUDE_DIRS ${MAGNUM_INCLUDE_DIR}

Loading…
Cancel
Save