mirror of
https://github.com/whoahq/whoa.git
synced 2026-03-18 13:41:06 +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
61 lines
967 B
CMake
61 lines
967 B
CMake
file(GLOB PRIVATE_SOURCES
|
|
"*.cpp"
|
|
"gui/*.cpp"
|
|
)
|
|
|
|
if(WHOA_SYSTEM_WIN)
|
|
file(GLOB WIN_SOURCES
|
|
"gui/win/*.cpp"
|
|
)
|
|
list(APPEND PRIVATE_SOURCES ${WIN_SOURCES})
|
|
endif()
|
|
|
|
if(WHOA_SYSTEM_MAC)
|
|
file(GLOB MAC_SOURCES
|
|
"gui/mac/*.cpp"
|
|
)
|
|
list(APPEND PRIVATE_SOURCES ${MAC_SOURCES})
|
|
endif()
|
|
|
|
if(WHOA_SYSTEM_LINUX)
|
|
file(GLOB LINUX_SOURCES
|
|
"gui/linux/*.cpp"
|
|
)
|
|
list(APPEND PRIVATE_SOURCES ${LINUX_SOURCES})
|
|
endif()
|
|
|
|
if(WHOA_SYSTEM_WEB)
|
|
file(GLOB WEB_SOURCES
|
|
"gui/web/*.cpp"
|
|
)
|
|
list(APPEND PRIVATE_SOURCES ${WEB_SOURCES})
|
|
endif()
|
|
|
|
add_library(client STATIC
|
|
${PRIVATE_SOURCES}
|
|
)
|
|
|
|
target_include_directories(client
|
|
PRIVATE
|
|
${CMAKE_SOURCE_DIR}/src
|
|
)
|
|
|
|
target_link_libraries(client
|
|
PRIVATE
|
|
ui
|
|
async
|
|
console
|
|
db
|
|
event
|
|
glue
|
|
gx
|
|
model
|
|
net
|
|
util
|
|
world
|
|
PUBLIC
|
|
bc
|
|
common
|
|
storm
|
|
)
|