Provides wasm/stubs/model_substitution_stub.cpp — no-op IsWrlExtension / STEP_CATALOG::Build / FindMatchFor — so pcbnew and footprint_editor link when the 3D viewer is off (KICAD_BUILD_3D_VIEWER_WASM=OFF). The KiCad 10 rebase made dialog_migrate_3d_models.cpp reference these, which live in the unlinked 3D library. The browser build has no 3D viewer, so model migration finds no substitutions. Bumps kicad to the matching CMake wiring (fef0343). Verified: pcbnew + footprint_editor compile and link clean (eeschema/symbol_editor unaffected). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
37 lines
1 KiB
C++
37 lines
1 KiB
C++
/*
|
|
* MODEL_SUBSTITUTION stubs for the KiCad WASM build.
|
|
*
|
|
* When KICAD_BUILD_3D_VIEWER_WASM=OFF the 3D-viewer library is not linked, but
|
|
* it is where the .wrl→STEP model-substitution helpers
|
|
* (3d-viewer/3d_cache/model_substitution_helpers.cpp) live. pcbnew's
|
|
* dialog_migrate_3d_models.cpp still references them, so the final pcbnew/
|
|
* footprint_editor link fails with undefined MODEL_SUBSTITUTION symbols.
|
|
*
|
|
* These no-op stubs satisfy the linker. There is no 3D viewer in the browser
|
|
* build, so model migration simply finds no substitutions (the dialog reports
|
|
* nothing to migrate) — which is the correct behavior for a WASM build with no
|
|
* local 3D model filesystem.
|
|
*/
|
|
|
|
#include <3d_cache/model_substitution_helpers.h>
|
|
|
|
namespace MODEL_SUBSTITUTION
|
|
{
|
|
|
|
bool IsWrlExtension( const wxString& )
|
|
{
|
|
return false;
|
|
}
|
|
|
|
|
|
void STEP_CATALOG::Build( const wxString&, const FILENAME_RESOLVER* )
|
|
{
|
|
}
|
|
|
|
|
|
wxString STEP_CATALOG::FindMatchFor( const wxString& ) const
|
|
{
|
|
return wxEmptyString;
|
|
}
|
|
|
|
} // namespace MODEL_SUBSTITUTION
|