From 67c6f166748a4012122a6e978f2f7dbdaee503cc Mon Sep 17 00:00:00 2001 From: skal Date: Thu, 12 Mar 2026 21:04:38 +0100 Subject: fix(build): move generated assets to per-build binary dir MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit assets_data.cc was shared in src/generated/ across all builds. When a native debug build regenerated it with --disk_load (file paths), then build_win compiled with STRIP_ALL=ON, the disk-load fopen() path was compiled out, leaving raw macOS paths as shader source content — causing wgpu WGSL parse errors on Wine. Fix: GEN_DEMO_H/CC and all stamps now live in CMAKE_CURRENT_BINARY_DIR/ src/generated/ so each build dir independently generates assets in the correct mode (embedded vs disk-load). Added CMAKE_CURRENT_BINARY_DIR/src to CORE_INCLUDES so the binary-dir assets.h is resolved first. handoff(Gemini): build system fix — assets are now per-build-dir; tests 35/35 pass; build_win produces embedded shaders. Co-Authored-By: Claude Sonnet 4.6 --- cmake/DemoDependencies.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmake/DemoDependencies.cmake') diff --git a/cmake/DemoDependencies.cmake b/cmake/DemoDependencies.cmake index daac571..55cc180 100644 --- a/cmake/DemoDependencies.cmake +++ b/cmake/DemoDependencies.cmake @@ -1,7 +1,7 @@ # External Dependencies and Includes # Finds and configures external libraries (WGPU, GLFW, platform libs) -set(CORE_INCLUDES src third_party) +set(CORE_INCLUDES ${CMAKE_CURRENT_BINARY_DIR}/src src third_party) if(DEMO_CROSS_COMPILE_WIN32) add_definitions(-DDEMO_CROSS_COMPILE_WIN32) -- cgit v1.2.3