pcbjam/wasm/cmake/FindFontconfig.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

29 lines
1 KiB
CMake

# FindFontconfig.cmake - Stub for WASM builds
# Fontconfig is not available in WASM - system fonts are not accessible from browser
# We provide stub values so CMake configuration succeeds
if(EMSCRIPTEN)
message(STATUS "Fontconfig not available for WASM build (system fonts not accessible in browser)")
# Set variables to indicate Fontconfig is "found" but disabled
set(Fontconfig_FOUND TRUE)
set(FONTCONFIG_FOUND TRUE)
# Provide empty values - actual code should be conditionally compiled
set(Fontconfig_INCLUDE_DIR "")
set(Fontconfig_LIBRARY "")
set(Fontconfig_LIBRARIES "")
set(FONTCONFIG_INCLUDE_DIR "")
set(FONTCONFIG_LIBRARY "")
set(FONTCONFIG_LIBRARIES "")
# Create an imported target
if(NOT TARGET Fontconfig::Fontconfig)
add_library(Fontconfig::Fontconfig INTERFACE IMPORTED)
endif()
mark_as_advanced(Fontconfig_INCLUDE_DIR Fontconfig_LIBRARY)
else()
# For non-WASM builds, use the system FindFontconfig
include(${CMAKE_ROOT}/Modules/FindFontconfig.cmake OPTIONAL)
endif()