Complete Phase 1: Build KiCad with optional dependencies disabled
Add CMake override modules, stub implementations, and patches to build KiCad without CURL, libgit2, OpenCASCADE, and ngspice dependencies. - cmake/: Find modules that provide stub targets when deps disabled - stubs/include/: Header stubs for curl, git2, ngspice, OCC - stubs/src/: Implementation stubs for disabled features - patches/: Consolidated patch for KiCad source modifications - scripts/: Build helper scripts Verified full native build on macOS with all optional deps disabled. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
2d7c26feac
commit
f1526d8c24
23 changed files with 3688 additions and 13 deletions
34
cmake/FindCURL.cmake
Normal file
34
cmake/FindCURL.cmake
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
#
|
||||
# KiCad Wasm Port - CURL Find Module Override
|
||||
#
|
||||
# When KICAD_USE_CURL=OFF, this module provides stub values
|
||||
# so the build can proceed without libcurl.
|
||||
#
|
||||
|
||||
# Check if curl is disabled
|
||||
if(DEFINED KICAD_USE_CURL AND NOT KICAD_USE_CURL)
|
||||
message(STATUS "CURL: DISABLED (KICAD_USE_CURL=OFF)")
|
||||
|
||||
# Set variables that KiCad expects
|
||||
set(CURL_FOUND TRUE)
|
||||
set(CURL_INCLUDE_DIRS "")
|
||||
set(CURL_LIBRARIES "")
|
||||
set(CURL_VERSION_STRING "stub")
|
||||
|
||||
# Create an imported target that does nothing
|
||||
if(NOT TARGET CURL::libcurl)
|
||||
add_library(CURL::libcurl INTERFACE IMPORTED)
|
||||
endif()
|
||||
|
||||
return()
|
||||
endif()
|
||||
|
||||
# Otherwise, use CMake's built-in FindCURL
|
||||
# Remove our path to avoid recursion
|
||||
list(REMOVE_ITEM CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}")
|
||||
|
||||
# Use built-in module
|
||||
include(${CMAKE_ROOT}/Modules/FindCURL.cmake)
|
||||
|
||||
# Restore module path
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}")
|
||||
Loading…
Reference in a new issue