whoa/test/CMakeLists.txt
Alex Tiernan-Berry d4d359acea feat(web): add Emscripten/WASM build infrastructure
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
2026-02-06 02:21:20 +00:00

73 lines
1.4 KiB
CMake

if(WHOA_SYSTEM_MAC)
file(GLOB PRIVATE_SOURCES
"Test.cpp"
"stub/Mac.mm"
"gx/*.cpp"
"gx/font/*.cpp"
"util/*.cpp"
)
set_source_files_properties(${PRIVATE_SOURCES}
PROPERTIES COMPILE_FLAGS "-x objective-c++"
)
add_executable(WhoaTest ${PRIVATE_SOURCES})
target_link_libraries(WhoaTest
PRIVATE
client
event
gx
util
"-framework AppKit"
"-framework Carbon"
"-framework IOKit"
)
endif()
if(WHOA_SYSTEM_WIN OR WHOA_SYSTEM_LINUX)
file(GLOB PRIVATE_SOURCES
"Test.cpp"
"gx/*.cpp"
"gx/font/*.cpp"
"util/*.cpp"
)
add_executable(WhoaTest ${PRIVATE_SOURCES})
target_link_libraries(WhoaTest
PRIVATE
client
event
gx
util
)
endif()
if(WHOA_SYSTEM_WEB)
file(GLOB PRIVATE_SOURCES
"Test.cpp"
"gx/*.cpp"
"gx/font/*.cpp"
"util/*.cpp"
)
add_executable(WhoaTest ${PRIVATE_SOURCES})
target_link_libraries(WhoaTest
PRIVATE
client
event
gx
util
)
endif()
target_include_directories(WhoaTest
PRIVATE
${CMAKE_SOURCE_DIR}/src
${CMAKE_SOURCE_DIR}/vendor/catch2-2.13.10
)
install(TARGETS WhoaTest DESTINATION "bin")