Files
.github
android-arm
android-arm64
android-x86
android-x86_64
bare-armv7emhf-nano_newlib
common
imagefiles
linux-arm64
linux-arm64-full
linux-arm64-lts
linux-arm64-musl
linux-armv5
linux-armv5-musl
linux-armv5-uclibc
linux-armv6
linux-armv6-lts
linux-armv6-musl
linux-armv7
linux-armv7-lts
linux-armv7a
linux-armv7a-lts
linux-armv7l-musl
linux-i686
linux-m68k-uclibc
linux-mips
linux-mips-lts
linux-mips-uclibc
linux-mipsel-lts
linux-ppc
linux-ppc64le
linux-ppc64le-lts
linux-riscv32
linux-riscv64
linux-s390x
linux-x64
linux-x64-clang
linux-x64-tinycc
linux-x86
linux-x86_64-full
linux-xtensa-uclibc
manylinux-common
manylinux2014-aarch64
manylinux2014-x64
manylinux2014-x86
manylinux_2_28-x64
manylinux_2_34-x64
test
tools
web-wasi
CheckTypeSize.c.in
CheckTypeSize.cmake
Dockerfile.in
FindOpenAL.cmake
FindOpenGL.cmake
TestBigEndian.cmake
Toolchain.cmake
WASI.cmake
clang++-wasi-sysroot.sh
clang-wasi-sysroot.sh
download-install-wasi-sdk.sh
web-wasi-emulated-threads
web-wasi-threads
web-wasm
windows-arm64
windows-armv7
windows-shared-x64
windows-shared-x64-posix
windows-shared-x86
windows-static-x64
windows-static-x64-posix
windows-static-x86
.gitattributes
.gitignore
CONTRIBUTING.md
Dockerfile.in
LICENSE
Makefile
README.md
dockcross/web-wasi/FindOpenGL.cmake
2022-02-22 23:14:30 -05:00

35 lines
1.1 KiB
CMake

# Locate OpenGL
# This module defines:
# OPENGL_FOUND - system has OpenGL
# OPENGL_XMESA_FOUND - system has XMESA
# OPENGL_GLU_FOUND - system has GLU
# OPENGL_INCLUDE_DIR - the GL include directory
# OPENGL_LIBRARIES - Link these to use OpenGL and GLU
# OPENGL_gl_LIBRARY - Path to OpenGL Library
# OPENGL_glu_LIBRARY - Path to GLU Library
# The implementation is based on the standard FindOpenGL.cmake provided with CMake,
# but customized for targeting Emscripten only.
# These libraries are provided with Emscripten
SET(OPENGL_FOUND TRUE)
SET(OPENGL_GLU_FOUND TRUE)
# Doesn't look like this one is part of Emscripten
SET(OPENGL_XMESA_FOUND FALSE)
# This is the path where <GL/gl.h> is found
SET(OPENGL_INCLUDE_DIR "${EMSCRIPTEN_ROOT_PATH}/system/include")
# No library to link against for OpenGL, since Emscripten picks it up automatically from library_webgl.js,
# but need to report something, or CMake thinks we failed in the search.
SET(OPENGL_LIBRARIES "nul")
SET(OPENGL_gl_LIBRARY "nul")
SET(OPENGL_glu_LIBRARY "nul")
mark_as_advanced(
OPENGL_INCLUDE_DIR
OPENGL_glu_LIBRARY
OPENGL_gl_LIBRARY
)