pcbjam/wasm/cmake/FindGLEW.cmake
Viktor Vaczi 9f4ed1e51e Add KiCad PCBnew WASM build support and documentation
Build infrastructure:
- Update build-pcbnew.sh with stub library compilation
- Update build-wxuniversal-wasm.sh with library symlinks and stubs
- Add stub libraries for libgit2 and curl (network ops via JS)
- Add WASM-specific CMake Find modules

Documentation:
- Add KICAD_WASM_BUILD.md with complete modification list
- Document 68 KiCad files modified for WASM support
- Document disabled features and reasons
- Document stub libraries and wxWidgets changes

Submodule updates:
- kicad: Add WASM/Emscripten build support (wasm-port branch)
- wxwidgets: Add KiCad compatibility fixes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 18:26:57 +01:00

27 lines
842 B
CMake

# FindGLEW.cmake - Stub for WASM builds
# GLEW is not needed for WASM/WebGL builds - OpenGL ES / WebGL is used directly
# Emscripten provides OpenGL ES 2.0/3.0 support through WebGL
if(EMSCRIPTEN)
message(STATUS "GLEW stubbed for WASM build (using Emscripten WebGL)")
# Set variables to indicate GLEW is "found" (stubbed)
set(GLEW_FOUND TRUE)
set(GLEW_LIBRARY "")
set(GLEW_LIBRARIES "")
set(GLEW_INCLUDE_DIR "")
set(GLEW_INCLUDE_DIRS "")
# For WASM/WebGL, we use OpenGL ES 2.0 via Emscripten
# The flags are added in linker options
# -sUSE_WEBGL2=1 or -sFULL_ES2=1 / -sFULL_ES3=1
mark_as_advanced(
GLEW_FOUND
GLEW_LIBRARY
GLEW_INCLUDE_DIR
)
else()
# For non-WASM builds, use the system FindGLEW
include(${CMAKE_ROOT}/Modules/FindGLEW.cmake OPTIONAL)
endif()