Browse Source

Keep galogen executable in cache

This prevents polluting the user's directory with a utility only used
at compile-time
zig-compilation
Macoy Madson 2 years ago
parent
commit
8199a4831d
  1. 10
      src/OpenGL.cake

10
src/OpenGL.cake

@ -173,8 +173,14 @@ void main()\n
(defun-comptime generate-gl-header (manager (& ModuleManager) module (* Module) &return bool)
(var galogen-source-file (* (const char)) "Dependencies/galogen/galogen.cpp")
(var galogen-executable (* (const char))
(comptime-cond ('Unix "galogen") ('Windows "galogen.exe")))
(var galogen-executable ([] 512 char))
(unless (outputFilenameFromSourceFilename
(call-on c_str (field manager buildOutputDir))
"galogen"
;; Add to end of file for type.
(comptime-cond ('Windows "exe") (true null))
galogen-executable (sizeof galogen-executable))
(return false))
;; Build galogen (GL header code generator)
(when (fileIsMoreRecentlyModified galogen-source-file galogen-executable)

Loading…
Cancel
Save