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>
45 lines
1.6 KiB
CMake
45 lines
1.6 KiB
CMake
# FindPythonLibs.cmake - Stub for WASM builds
|
|
# Python libraries are not available/needed for WASM builds (no Python scripting)
|
|
# We provide stub values so CMake configuration succeeds
|
|
|
|
if(EMSCRIPTEN)
|
|
message(STATUS "Python libraries stubbed for WASM build (Python scripting disabled)")
|
|
|
|
# Find the Python interpreter first (we need it for some build scripts)
|
|
find_program(PYTHON_EXECUTABLE NAMES python3 python)
|
|
|
|
if(PYTHON_EXECUTABLE)
|
|
# Get Python version
|
|
execute_process(
|
|
COMMAND "${PYTHON_EXECUTABLE}" -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')"
|
|
OUTPUT_VARIABLE PYTHON_VERSION_STRING
|
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
|
)
|
|
string(REPLACE "." ";" VERSION_LIST "${PYTHON_VERSION_STRING}")
|
|
list(GET VERSION_LIST 0 PYTHON_VERSION_MAJOR)
|
|
list(GET VERSION_LIST 1 PYTHON_VERSION_MINOR)
|
|
else()
|
|
set(PYTHON_VERSION_MAJOR "3")
|
|
set(PYTHON_VERSION_MINOR "10")
|
|
set(PYTHON_VERSION_STRING "3.10")
|
|
endif()
|
|
|
|
# Set variables to indicate PythonLibs is "found" (stubbed)
|
|
set(PYTHONLIBS_FOUND TRUE)
|
|
set(PythonLibs_FOUND TRUE)
|
|
|
|
# Provide stub values - the actual libraries won't be linked
|
|
set(PYTHON_LIBRARIES "")
|
|
set(PYTHON_INCLUDE_DIRS "/usr/include/python${PYTHON_VERSION_STRING}")
|
|
set(PYTHON_INCLUDE_DIR "${PYTHON_INCLUDE_DIRS}")
|
|
set(PYTHON_LIBRARY "")
|
|
|
|
mark_as_advanced(
|
|
PYTHON_LIBRARIES
|
|
PYTHON_INCLUDE_DIRS
|
|
PYTHON_LIBRARY
|
|
)
|
|
else()
|
|
# For non-WASM builds, use the system FindPythonLibs
|
|
include(${CMAKE_ROOT}/Modules/FindPythonLibs.cmake OPTIONAL)
|
|
endif()
|