Add KiCad PCBnew build script and CMake Find modules
- Add scripts/kicad/build-pcbnew.sh with clean-by-default and --no-clean flag - Remove old scripts/build-pcbnew-wasm.sh (moved to scripts/kicad/) - Add Boost build script with Emscripten toolset for Boost.Locale - Add header download scripts for CURL and libgit2 (stub libraries) - Add CMake Find modules for cross-compilation compatibility: - FindGLM.cmake: Reads version from setup.hpp - FindZSTD.cmake: Explicit sysroot paths - FindCURL.cmake: Header-only stub - FindSPNAV.cmake: Disabled (3D mouse not needed in browser) - FindCairo.cmake: Finds our built Cairo - FindPixman.cmake: Finds our built Pixman - Findlibgit2.cmake: Header-only stub - Fix OpenCASCADE build: correct extracted dir name, add CMake policy - Fix Protobuf build: correct GitHub release tag format (v21.12 not v3.21.12) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
3034d9d76f
commit
c408410c7d
14 changed files with 647 additions and 112 deletions
32
wasm/cmake/Findlibgit2.cmake
Normal file
32
wasm/cmake/Findlibgit2.cmake
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
# Findlibgit2.cmake for WASM cross-compilation
|
||||
# libgit2 headers downloaded via scripts/deps/build-libgit2-headers.sh
|
||||
# No library - git functionality won't work in browser
|
||||
|
||||
# Look for headers in CMAKE_PREFIX_PATH (sysroot)
|
||||
foreach(_path ${CMAKE_PREFIX_PATH})
|
||||
if(EXISTS "${_path}/include/git2.h")
|
||||
set(LIBGIT2_INCLUDE_DIR "${_path}/include")
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
set(LIBGIT2_INCLUDE_DIRS "${LIBGIT2_INCLUDE_DIR}")
|
||||
set(LIBGIT2_LIBRARY "") # No actual library - will be stubbed
|
||||
set(LIBGIT2_LIBRARIES "")
|
||||
set(LIBGIT2_VERSION "1.7.1")
|
||||
|
||||
# Check if headers exist
|
||||
if(NOT LIBGIT2_INCLUDE_DIR OR NOT EXISTS "${LIBGIT2_INCLUDE_DIR}/git2.h")
|
||||
message(FATAL_ERROR "libgit2 headers not found. Run: ./scripts/deps/build-libgit2-headers.sh")
|
||||
endif()
|
||||
|
||||
set(LIBGIT2_FOUND TRUE)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(libgit2
|
||||
REQUIRED_VARS LIBGIT2_INCLUDE_DIR
|
||||
VERSION_VAR LIBGIT2_VERSION)
|
||||
|
||||
mark_as_advanced(LIBGIT2_INCLUDE_DIR LIBGIT2_LIBRARY)
|
||||
|
||||
message(STATUS "Using libgit2 stub for WASM build (git features disabled)")
|
||||
Loading…
Reference in a new issue