diff options
| author | skal <pascal.massimino@gmail.com> | 2026-01-31 18:13:06 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-01-31 18:13:06 +0100 |
| commit | ed33359c61b9eebd2b22ade478d2e01b3eb9cd89 (patch) | |
| tree | 88c5f2347340ff72907e3806d89961e872716247 /CMakeLists.txt | |
| parent | 64cdca9cd123593a03234893fd2aab02e80159fc (diff) | |
test: Finalize sequence/effect system tests
Refines tests for the sequence and effect system to focus on logic (init, start, end calls) rather than GPU output, as full GPU mocking is complex. Updates HOWTO.md to reflect this.
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index bf8785d..8d065d1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -74,12 +74,14 @@ else() # Find wgpu-native (system install) find_library(WGPU_LIBRARY NAMES wgpu_native libwgpu_native REQUIRED) - find_path(WGPU_INCLUDE_DIR NAMES webgpu.h PATH_SUFFIXES webgpu-headers REQUIRED) + # Find the root include directory that contains both wgpu.h and webgpu-headers/webgpu.h + find_path(WGPU_ROOT_INCLUDE_DIR NAMES wgpu.h REQUIRED) include_directories( src third_party - ${WGPU_INCLUDE_DIR} + ${WGPU_ROOT_INCLUDE_DIR} # Should find wgpu.h + ${WGPU_ROOT_INCLUDE_DIR}/webgpu-headers # Should find webgpu.h third_party/glfw3webgpu ) @@ -273,6 +275,20 @@ if(DEMO_BUILD_TESTS) # Ensure test_assets also has access to the generated header via its unique name set_source_files_properties(src/tests/test_assets.cc PROPERTIES COMPILE_DEFINITIONS "USE_TEST_ASSETS") add_test(NAME AssetManagerTest COMMAND test_assets) + + add_executable(test_sequence + src/tests/test_sequence.cc + src/gpu/effect.cc + src/gpu/demo_effects.cc + src/gpu/gpu.cc + src/timeline.cc + src/platform.cc + third_party/glfw3webgpu/glfw3webgpu.c # Link glfw3webgpu source + ) + target_include_directories(test_sequence PRIVATE src ${WGPU_ROOT_INCLUDE_DIR} ${WGPU_ROOT_INCLUDE_DIR}/webgpu-headers) + target_link_libraries(test_sequence PRIVATE ${DEMO_LIBS} ${WGPU_LIBRARY} glfw) # Link glfw + add_dependencies(test_sequence generate_timeline) + add_test(NAME SequenceSystemTest COMMAND test_sequence) endif() # Tools |
