refactor: 💡 remove orphaned files
This commit is contained in:
parent
8e413f89ec
commit
c148443b7b
13 changed files with 54 additions and 1038 deletions
|
|
@ -1,49 +0,0 @@
|
|||
# FindKiplatformWASM.cmake
|
||||
# Find module for WASM implementation of kiplatform
|
||||
#
|
||||
# This module is used instead of the platform-specific kiplatform
|
||||
# when building KiCad for WebAssembly.
|
||||
#
|
||||
# This module defines:
|
||||
# KIPLATFORM_FOUND - System has kiplatform for WASM
|
||||
# KIPLATFORM_INCLUDE_DIRS - Include directories
|
||||
# KIPLATFORM_LIBRARIES - Libraries to link
|
||||
# KIPLATFORM_SOURCES - Source files to compile
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
if(NOT EMSCRIPTEN)
|
||||
message(FATAL_ERROR "FindKiplatformWASM is only for Emscripten builds")
|
||||
endif()
|
||||
|
||||
# Get the directory containing this file
|
||||
get_filename_component(_FIND_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
||||
get_filename_component(KIPLATFORM_WASM_DIR "${_FIND_DIR}/../kiplatform" ABSOLUTE)
|
||||
|
||||
# Define source files
|
||||
set(KIPLATFORM_SOURCES
|
||||
${KIPLATFORM_WASM_DIR}/app.cpp
|
||||
${KIPLATFORM_WASM_DIR}/drivers.cpp
|
||||
${KIPLATFORM_WASM_DIR}/environment.cpp
|
||||
${KIPLATFORM_WASM_DIR}/io.cpp
|
||||
${KIPLATFORM_WASM_DIR}/policy.cpp
|
||||
${KIPLATFORM_WASM_DIR}/secrets.cpp
|
||||
${KIPLATFORM_WASM_DIR}/sysinfo.cpp
|
||||
${KIPLATFORM_WASM_DIR}/ui.cpp
|
||||
)
|
||||
|
||||
# Include directory for platform headers
|
||||
# We use KiCad's own headers, just provide our implementation
|
||||
set(KIPLATFORM_INCLUDE_DIRS ${KIPLATFORM_WASM_DIR})
|
||||
|
||||
# No prebuilt library - sources are compiled directly into KiCad
|
||||
set(KIPLATFORM_LIBRARIES "")
|
||||
|
||||
# Mark as found
|
||||
set(KIPLATFORM_FOUND TRUE)
|
||||
|
||||
find_package_handle_standard_args(KiplatformWASM
|
||||
REQUIRED_VARS KIPLATFORM_SOURCES KIPLATFORM_INCLUDE_DIRS
|
||||
)
|
||||
|
||||
mark_as_advanced(KIPLATFORM_SOURCES KIPLATFORM_INCLUDE_DIRS KIPLATFORM_LIBRARIES)
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
# FindLibcontextWASM.cmake
|
||||
# Find module for WASM implementation of libcontext using Asyncify
|
||||
#
|
||||
# This module replaces the platform-specific libcontext assembly
|
||||
# when building KiCad for WebAssembly.
|
||||
#
|
||||
# This module defines:
|
||||
# LIBCONTEXT_FOUND - System has libcontext for WASM
|
||||
# LIBCONTEXT_INCLUDE_DIRS - Include directories
|
||||
# LIBCONTEXT_LIBRARIES - Libraries to link (none for WASM)
|
||||
# LIBCONTEXT_SOURCES - Source files to compile
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
if(NOT EMSCRIPTEN)
|
||||
message(FATAL_ERROR "FindLibcontextWASM is only for Emscripten builds")
|
||||
endif()
|
||||
|
||||
# Get the directory containing this file
|
||||
get_filename_component(_FIND_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
||||
get_filename_component(LIBCONTEXT_WASM_DIR "${_FIND_DIR}/../libcontext" ABSOLUTE)
|
||||
|
||||
# Define source files
|
||||
set(LIBCONTEXT_SOURCES
|
||||
${LIBCONTEXT_WASM_DIR}/libcontext_wasm.cpp
|
||||
)
|
||||
|
||||
# Include directories
|
||||
set(LIBCONTEXT_INCLUDE_DIRS ${LIBCONTEXT_WASM_DIR})
|
||||
|
||||
# No prebuilt library
|
||||
set(LIBCONTEXT_LIBRARIES "")
|
||||
|
||||
# Mark as found
|
||||
set(LIBCONTEXT_FOUND TRUE)
|
||||
|
||||
find_package_handle_standard_args(LibcontextWASM
|
||||
REQUIRED_VARS LIBCONTEXT_SOURCES LIBCONTEXT_INCLUDE_DIRS
|
||||
)
|
||||
|
||||
mark_as_advanced(LIBCONTEXT_SOURCES LIBCONTEXT_INCLUDE_DIRS LIBCONTEXT_LIBRARIES)
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
# KiCad WASM Configuration
|
||||
# This file configures KiCad to use WASM-specific implementations
|
||||
|
||||
if(NOT EMSCRIPTEN)
|
||||
message(FATAL_ERROR "KiCadWASMConfig.cmake is only for Emscripten builds")
|
||||
endif()
|
||||
|
||||
# Set the path to WASM compatibility layer
|
||||
get_filename_component(KICAD_WASM_DIR "${CMAKE_CURRENT_LIST_DIR}/.." ABSOLUTE)
|
||||
|
||||
message(STATUS "KiCad WASM compatibility layer: ${KICAD_WASM_DIR}")
|
||||
|
||||
# Add include directories for WASM implementations
|
||||
# These will be searched BEFORE KiCad's own includes, allowing us to
|
||||
# provide our own implementations without modifying KiCad source
|
||||
set(KICAD_WASM_INCLUDE_DIRS
|
||||
${KICAD_WASM_DIR}/kiplatform
|
||||
${KICAD_WASM_DIR}/libcontext
|
||||
${KICAD_WASM_DIR}/config
|
||||
${KICAD_WASM_DIR}/shims
|
||||
)
|
||||
|
||||
# Define macro to indicate we're using WASM platform
|
||||
add_definitions(-DKICAD_PLATFORM_WASM=1)
|
||||
add_definitions(-D__WXUNIVERSAL__=1)
|
||||
|
||||
# Emscripten-specific compile options
|
||||
add_compile_options(
|
||||
-pthread
|
||||
-sUSE_PTHREADS=1
|
||||
)
|
||||
|
||||
# Emscripten-specific link options
|
||||
add_link_options(
|
||||
-pthread
|
||||
-sUSE_PTHREADS=1
|
||||
-sPTHREAD_POOL_SIZE=4
|
||||
-sASYNCIFY=1
|
||||
-sASYNCIFY_STACK_SIZE=65536
|
||||
-sALLOW_MEMORY_GROWTH=1
|
||||
-sINITIAL_MEMORY=256MB
|
||||
-sMAXIMUM_MEMORY=4GB
|
||||
-sMODULARIZE=1
|
||||
-sEXPORT_ES6=1
|
||||
-sENVIRONMENT=web,worker
|
||||
)
|
||||
|
||||
# Export variables for use by parent CMakeLists
|
||||
set(KICAD_WASM_INCLUDE_DIRS ${KICAD_WASM_INCLUDE_DIRS} PARENT_SCOPE)
|
||||
set(KICAD_WASM_DIR ${KICAD_WASM_DIR} PARENT_SCOPE)
|
||||
Loading…
Reference in a new issue