summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt20
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