mirror of
https://github.com/whoahq/whoa.git
synced 2026-03-18 05:31:07 +03:00
Adds the platform layer for building whoa as a WebAssembly application: Working: - CMake configuration for WHOA_SYSTEM_WEB with pthreads and ASYNCIFY - Web entry point and HTML shell template - Event loop adapted for emscripten_set_main_loop callback model - WebSocket-based networking (WowConnection over JS WebSocket API) - Sound system stubs (audio not yet implemented) - FetchFS for async file loading from web server - Freetype fixes for WASM compatibility (type mismatches) - Input handling for web canvas Missing (in separate commits): - WebGPU graphics backend (CGxDeviceWebGPU) - WGSL shaders - API selection in Device.cpp
35 lines
665 B
CMake
35 lines
665 B
CMake
file(GLOB PRIVATE_SOURCES "*.cpp")
|
|
|
|
if(WHOA_SYSTEM_WEB)
|
|
# For web builds, exclude FMOD-dependent files and use stubs
|
|
list(REMOVE_ITEM PRIVATE_SOURCES
|
|
${CMAKE_CURRENT_SOURCE_DIR}/SESound.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/SESoundInternal.cpp
|
|
)
|
|
|
|
file(GLOB WEB_SOURCES "web/*.cpp")
|
|
list(APPEND PRIVATE_SOURCES ${WEB_SOURCES})
|
|
endif()
|
|
|
|
add_library(sound STATIC
|
|
${PRIVATE_SOURCES}
|
|
)
|
|
|
|
target_include_directories(sound
|
|
PRIVATE
|
|
${CMAKE_SOURCE_DIR}/src
|
|
)
|
|
|
|
target_link_libraries(sound
|
|
PRIVATE
|
|
ui
|
|
util
|
|
)
|
|
|
|
if(NOT WHOA_SYSTEM_WEB)
|
|
target_link_libraries(sound
|
|
PUBLIC
|
|
fmod
|
|
)
|
|
endif()
|