summaryrefslogtreecommitdiff
path: root/cmake/DemoLibraries.cmake
diff options
context:
space:
mode:
authorskal <pascal.massimino@gmail.com>2026-02-17 11:32:05 +0100
committerskal <pascal.massimino@gmail.com>2026-02-17 11:32:05 +0100
commit95dd0ff4c000f3752c5c9112d79de3a4bdaa7b25 (patch)
treeec6ff52b0bd8de357068f3bb7521ddf0b004c5e2 /cmake/DemoLibraries.cmake
parentbd26bc743933dcd5241fc87d160a893f83644dfb (diff)
fix(build): Resolve clean build failure from generated timeline header
When starting from a clean tree (where `src/generated/` does not exist), the build would fail with a "file not found" error for `generated/timeline.h`. This was due to an incorrect dependency graph where `gpu.cc` was compiled before its required header was generated. This commit fixes the issue by making the dependency explicit: - Modified `tools/seq_compiler.py` to explicitly generate `timeline.h` alongside `timeline.cc`. - Updated `cmake/DemoCodegen.cmake` to declare both files as `OUTPUT`s of the timeline compilation step. - Added a direct dependency from the `gpu` library target to the `generate_timeline` custom target in `cmake/DemoLibraries.cmake`. - Refactored the generated file paths in `DemoCodegen.cmake` into a single `GENERATED_CODE` variable for improved clarity and future-proofing.
Diffstat (limited to 'cmake/DemoLibraries.cmake')
-rw-r--r--cmake/DemoLibraries.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmake/DemoLibraries.cmake b/cmake/DemoLibraries.cmake
index f1891fb..39cd3f4 100644
--- a/cmake/DemoLibraries.cmake
+++ b/cmake/DemoLibraries.cmake
@@ -21,9 +21,9 @@ target_include_directories(3d PUBLIC ${CORE_INCLUDES})
add_dependencies(3d generate_demo_assets)
# GPU effects library
-add_library(gpu STATIC ${GPU_SOURCES})
+add_library(gpu STATIC ${GPU_SOURCES} ${GENERATED_TIMELINE_CC})
target_include_directories(gpu PUBLIC ${CORE_INCLUDES})
-add_dependencies(gpu generate_demo_assets)
+add_dependencies(gpu generate_demo_assets generate_timeline)
# Note: Static libraries do not strictly need to link dependencies,
# but if they did, PRIVATE would propagate to the executable.