Add Inspection and Import WebAssembly probes
Some checks failed
FreeCAD master CI / Prepare (push) Has been cancelled
FreeCAD master CI / Pixi (push) Has been cancelled
FreeCAD master CI / Ubuntu (push) Has been cancelled
FreeCAD master CI / Windows (push) Has been cancelled
FreeCAD master CI / Lint (push) Has been cancelled
FreeCAD master CI / WrapUp (push) Has been cancelled
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Scorecard supply-chain security / Scorecard analysis (push) Has been cancelled
Stale Issues / stale (push) Has been cancelled

This commit is contained in:
2026-08-21 10:57:23 +08:00
parent c87b2871be
commit a6f251f657
15 changed files with 1264 additions and 59 deletions

View File

@@ -57,6 +57,7 @@ option(FREECAD_WEB "Build the FreeCAD WebAssembly core configuration" OFF)
option(FREECAD_WEB_ENABLE_ASSEMBLY "Enable the Assembly Web probe and its dependency closure" OFF)
option(FREECAD_WEB_ENABLE_CAM "Enable the CAM Path App Web probe and its dependency closure" OFF)
option(FREECAD_WEB_ENABLE_CLOUD "Enable the Cloud App Web probe and its dependency closure" OFF)
option(FREECAD_WEB_ENABLE_INSPECTION "Enable the Inspection App Web probe and its dependency closure" OFF)
if(FREECAD_WEB)
if(NOT EMSCRIPTEN OR NOT CMAKE_SYSTEM_NAME STREQUAL "Emscripten")
message(FATAL_ERROR
@@ -72,6 +73,7 @@ if(FREECAD_WEB)
set(FREECAD_USE_PCH OFF CACHE BOOL "Web core does not use desktop PCH defaults" FORCE)
set(FREECAD_USE_FREETYPE OFF CACHE BOOL "Web core leaves optional FreeType disabled" FORCE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -include${CMAKE_SOURCE_DIR}/src/FCWebRangesCompat.h")
add_compile_definitions(FREECAD_WEB_CORE)
set(_freecad_web_disabled_options
BUILD_ADDONMGR
@@ -118,6 +120,9 @@ if(FREECAD_WEB)
if(FREECAD_WEB_ENABLE_CLOUD)
list(REMOVE_ITEM _freecad_web_disabled_options BUILD_CLOUD)
endif()
if(FREECAD_WEB_ENABLE_INSPECTION)
list(REMOVE_ITEM _freecad_web_disabled_options BUILD_INSPECTION BUILD_MESH BUILD_POINTS)
endif()
foreach(_freecad_web_disabled_option IN LISTS _freecad_web_disabled_options)
set(${_freecad_web_disabled_option} OFF CACHE BOOL "Disabled by FREECAD_WEB core configuration" FORCE)
endforeach()
@@ -139,6 +144,11 @@ if(FREECAD_WEB)
if(FREECAD_WEB_ENABLE_CLOUD)
set(BUILD_CLOUD ON CACHE BOOL "Enabled by FREECAD_WEB_ENABLE_CLOUD" FORCE)
endif()
if(FREECAD_WEB_ENABLE_INSPECTION)
foreach(_freecad_web_inspection_option BUILD_INSPECTION BUILD_MESH BUILD_POINTS)
set(${_freecad_web_inspection_option} ON CACHE BOOL "Enabled by FREECAD_WEB_ENABLE_INSPECTION" FORCE)
endforeach()
endif()
include(cMake/FreeCADWebDependencies.cmake)
endif()